#include <vector2.h>
Public Member Functions | |
float | x () const |
float | y () const |
Vector2 () | |
Vector2 (const Vector2 &q) | |
Vector2 (float x, float y) | |
Vector2 | operator- () const |
const Vector2 & | operator+ () const |
float | operator* (const Vector2 &q) const |
Vector2 | operator* (float a) const |
Vector2 | operator/ (float a) const |
Vector2 | operator+ (const Vector2 &q) const |
Vector2 | operator- (const Vector2 &q) const |
bool | operator== (const Vector2 &q) const |
bool | operator!= (const Vector2 &q) const |
Vector2 & | operator*= (float a) |
Vector2 & | operator/= (float a) |
Vector2 & | operator+= (const Vector2 &q) |
Vector2 & | operator-= (const Vector2 &q) |
Defines a two-dimensional vector and its operations.
|
inline |
Constructs a null vector.
|
inline |
Copy constructor.
q | The vector to be copied into the new vector. |
|
inline |
Constructor.
x | The x-component of the new vector. |
y | The y-component of the new vector. |
|
inline |
Vector inequality.
q | The right hand side vector |
|
inline |
Dot product.
q | The right hand side vector |
|
inline |
Scalar product.
a | The right hand side scalar |
|
inline |
The operator multiplies the vector by a scalar.
a | The scalar |
|
inline |
Unary plus.
Vector addition.
q | The right hand side vector |
The operator adds an rhs vector to the vector.
q | The right hand side vector |
|
inline |
Unary minus.
Vector subtraction.
q | The right hand side vector |
The operator subtracts an rhs vector from the vector.
q | The right hand side vector |
|
inline |
Scalar division.
a | The right hand side scalar |
|
inline |
The operator divides the vector by a scalar.
a | The scalar |
|
inline |
Vector equality.
q | The right hand side vector |
|
inline |
|
inline |