Flair
Framework Libre Air
|
Class defining a 2D vector. More...
#include <Vector2D.h>
Public Member Functions | |
Vector2D (float x=0, float y=0) | |
Constructor. More... | |
~Vector2D () | |
Destructor. More... | |
void | Rotate (float value) |
Rotation. More... | |
void | RotateDeg (float value) |
Rotation. More... | |
float | GetNorm (void) const |
Norm. More... | |
void | Normalize (void) |
Normalize. More... | |
void | Saturate (Vector2D min, Vector2D max) |
Saturate. More... | |
void | Saturate (float min, float max) |
Saturate. More... | |
void | Saturate (const Vector2D &value) |
Saturate. More... | |
void | Saturate (float value) |
Saturate. More... | |
Vector2D & | operator= (const Vector2D &vector) |
Public Attributes | |
float | x |
x More... | |
float | y |
y More... | |
Class defining a 2D vector.
flair::core::Vector2D::Vector2D | ( | float | x = 0 , |
float | y = 0 |
||
) |
flair::core::Vector2D::~Vector2D | ( | ) |
Destructor.
void flair::core::Vector2D::Rotate | ( | float | value | ) |
Rotation.
value | rotation value in radians |
void flair::core::Vector2D::RotateDeg | ( | float | value | ) |
Rotation.
value | rotation value in degrees |
float flair::core::Vector2D::GetNorm | ( | void | ) | const |
Norm.
void flair::core::Vector2D::Normalize | ( | void | ) |
Normalize.
void flair::core::Vector2D::Saturate | ( | float | min, |
float | max | ||
) |
Saturate.
Saturate between min and max
min | minimum Vector2D(min,min) value |
max | maximum Vector2D(max,max) value |
void flair::core::Vector2D::Saturate | ( | const Vector2D & | value | ) |
void flair::core::Vector2D::Saturate | ( | float | value | ) |
Saturate.
Saturate between -abs(Vector2D(value,value)) and abs(Vector2D(value,value))
value | saturation Vector2D(value,value) |
float flair::core::Vector2D::x |
x
float flair::core::Vector2D::y |
y