Fovia's C++ Client/Server API
|
Public Member Functions | |
VECTOR2F | add (const VECTOR2F &var) |
void | assign (const VECTOR2F ©) |
float | length () |
VECTOR2F | mul (const VECTOR2F &var) |
void | normalize () |
VECTOR2F | operator* (const float &var) |
VECTOR2F | operator* (const VECTOR2F &var) |
VECTOR2F | operator+ (const VECTOR2F &var) |
VECTOR2F & | operator+= (const VECTOR2F &r) |
VECTOR2F | operator- (const VECTOR2F &var) |
VECTOR2F & | operator= (const VECTOR2F &r) |
bool | operator== (VECTOR2F v) |
VECTOR2F | scale (const float scalar) |
VECTOR2F | sub (const VECTOR2F &var) |
VECTOR2F () | |
VECTOR2F (const VECTOR2F ©) | |
VECTOR2F (float nx, float ny) | |
Public Attributes | |
float | x |
float | y |
Single precision 2F vector class.
|
inline |
Constructs a new VECTOR2F object. The member fields are not initialized by this function.
|
inline |
Copies the contents of copy into this vector.
copy | the vector from which to copy values into this vector. |
References assign().
|
inline |
|
inline |
Assigns the contents of copy to the member fields in this object.
copy | The vector from which to copy values from. |
Referenced by VECTOR2F().
|
inline |
|
inline |
Performs an in-place normalization of this vector. Note that unlike other vector operations, this is a mutable member function rather than one that returns the result. After this function completes, the result of the length() function on this vector should be roughly 1.0.
|
inline |
float VECTOR2F::x |
The x value.
Referenced by add(), length(), mul(), normalize(), scale(), sub(), and VECTOR2F().
float VECTOR2F::y |
The y value.
Referenced by add(), length(), mul(), normalize(), scale(), sub(), and VECTOR2F().