#include <vector2.h>
Public Member Functions | |
vector2 () | |
Constructs an uninitialized vector. | |
vector2 (const component xp, const component yp) | |
Constructs a vector. | |
void | operator+= (const component c) |
Per-component addition of a scalar. | |
void | operator+= (const vector2 &u) |
Component-wise addition. | |
void | operator-= (const component c) |
Per-component subtraction of a scalar. | |
void | operator-= (const vector2 &u) |
Component-wise subtraction. | |
void | operator *= (const component c) |
Multiplication with a scalar. | |
void | operator *= (const vector2 &u) |
Component-wise multiplication. | |
void | operator/= (const component c) |
Division by a scalar. | |
void | operator/= (const vector2 &u) |
Component-wise division. | |
operator vertex () | |
Converts this vector to a vertex with the same coordinates. | |
void | operator= (const vertex &v) |
Assignment operator. | |
Public Attributes | |
component | x |
The x coordinate. | |
component | y |
The y coordinate. |
|
Constructs a vector.
|