class csVector2 A 2D vector
| | x |
| | y |
| | csVector2 (float x, float y) Make a new vector and initialize with the given values. |
| | csVector2 () Make a new vector. No initialization is done. |
| | Norm () Return the norm (magnitude) of this vector. |
| | Norm (const csVector2& v) Return the norm (magnitude) of a 2D vector. |
| | operator!= (const csVector2& v1, const csVector2& v2) Check if two vectors are not equal. |
| | operator* (float f, const csVector2& v) Multiply a vector and a scalar. |
| | operator* (const csVector2& v, float f) Multiply a vector and a scalar. |
| | operator* (const csVector2& v1, const csVector2& v2) Take the dot product of two vectors. |
| | operator*= (float f) Multiply this vector by a scalar. |
| | operator+ () Unary + operator. |
| | operator+ (const csVector2& v1, const csVector2& v2) Add two vectors. |
| | operator+= (const csVector2& v) Add another vector to this vector. |
| | operator- () Unary - operator. |
| | operator- (const csVector2& v1, const csVector2& v2) Subtract two vectors. |
| | operator-= (const csVector2& v) Subtract another vector from this vector. |
| | operator/ (const csVector2& v, float f) Divide a vector by a scalar. |
| | operator/= (float f) Divide this vector by a scalar. |
| | operator== (const csVector2& v1, const csVector2& v2) Check if two vectors are equal. |
| | Rotate (float angle) Rotate vector around the origin by a given angle in radians. |
| | Set (float ix, float iy) Set vector to given values. |
A 2D vector
float y
csVector2()
csVector2(float x, float y)
inline void Set(float ix, float iy)
static float Norm(const csVector2& v)
float Norm()
void Rotate(float angle)
csVector2& operator+= (const csVector2& v)
csVector2& operator-= (const csVector2& v)
csVector2& operator*= (float f)
csVector2& operator/= (float f)
inline csVector2 operator+ ()
inline csVector2 operator- ()
friend csVector2 operator+ (const csVector2& v1, const csVector2& v2)
friend csVector2 operator- (const csVector2& v1, const csVector2& v2)
friend float operator* (const csVector2& v1, const csVector2& v2)
friend csVector2 operator* (const csVector2& v, float f)
friend csVector2 operator* (float f, const csVector2& v)
friend csVector2 operator/ (const csVector2& v, float f)
friend bool operator== (const csVector2& v1, const csVector2& v2)
friend bool operator!= (const csVector2& v1, const csVector2& v2)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de