![]() | |
![]() | ![]() |
Entire Class Index | Main Class Index | Cross Index | Global Index |
A 2D Vector class
Contained in: global
Derived from:
none
Derived by:
none
Group: Core (Math)
#include <ClanLib/core.h>
public function member index: |
||
Construction: |
||
CL_Vector2 | (); | |
CL_Vector2 | (float fX, float fY); | |
CL_Vector2 | (float afCoordinate[2]); | |
CL_Vector2 | (const CL_Vector2& rkVector); | |
Operators: |
||
float& | operator [] | (int i) const; |
operator float* | (); | |
CL_Vector2& | operator = | (const CL_Vector2& rkVector); |
bool | operator == | (const CL_Vector2& rkVector) const; |
bool | operator != | (const CL_Vector2& rkVector) const; |
bool | operator < | (const CL_Vector2& rkVector) const; |
bool | operator <= | (const CL_Vector2& rkVector) const; |
bool | operator > | (const CL_Vector2& rkVector) const; |
bool | operator >= | (const CL_Vector2& rkVector) const; |
CL_Vector2 | operator + | (const CL_Vector2& rkVector) const; |
CL_Vector2 | operator - | (const CL_Vector2& rkVector) const; |
CL_Vector2 | operator * | (float fScalar) const; |
CL_Vector2 | operator / | (float fScalar) const; |
CL_Vector2 | operator - | () const; |
CL_Vector2& | operator += | (const CL_Vector2& rkVector); |
CL_Vector2& | operator -= | (const CL_Vector2& rkVector); |
CL_Vector2& | operator *= | (float fScalar); |
CL_Vector2& | operator /= | (float fScalar); |
Attributes: |
||
void | set_fuzz | (); |
void | disable_fuzz | (); |
bool | get_fuzz | (); |
float | length | () const; |
float | squared_length | () const; |
float | dot | (const CL_Vector2& rkVector) const; |
float | unitize | (float fTolerance = 1e-06f); |
CL_Vector2 | cross | () const; |
CL_Vector2 | unit_cross | () const; |
fX - The X coordinate.
fY - The Y coordinate.
rkVector = Vector to copy
FIXME
Returns - Return y,-x
Returns - True if using fuzzy arithmatic
Return - sqrt(x^2+y^2)
Supports fuzzy arimatic when FUZZ > 0
Return - The negative of the Vector
Supports fuzzy arimatic when FUZZ > 0
Supports fuzzy arimatic when FUZZ > 0
Supports fuzzy arimatic when FUZZ > 0
Supports fuzzy arimatic when FUZZ > 0
Supports fuzzy arimatic when FUZZ > 0
Returns - The requested parameter
Returns - x^2+y^2
Returns - (y,-x)/sqrt(x^2+y^2)