float2 Struct Reference

Represents a 2D vector of floats for use on both the CPU and GPU. More...

Functions

 float2 (float m_x, float m_y)
 Constructor : Creates a float2 whose elements have the specified values. More...
 
float2 add (float2 b)
 
float2 sub (float2 b)
 

Attributes

float x
 the x component of the float2. More...
 
float y
 the y component of the float2. More...
 

Detailed Description

Represents a 2D vector of floats for use on both the CPU and GPU.

Constructor and Destructor

◆ float2()

float2 ( float  m_x,
float  m_y 
)
inline

Constructor : Creates a float2 whose elements have the specified values.

Parameters
m_xvalue to assign to the x field
m_yvalue to assign to the y field

Referenced by float2.add(), and float2.sub().

Functions

◆ add()

float2 add ( float2  b)
inline

◆ sub()

float2 sub ( float2  b)
inline

Variables

◆ x

float x

the x component of the float2.

Referenced by float2.add(), float2.float2(), and float2.sub().

◆ y

float y

the y component of the float2.

Referenced by float2.add(), float2.float2(), and float2.sub().