|
| Vector2 () |
| Constructs a new Vector2 at (0, 0) More...
|
|
| Vector2 (double x, double y) |
| Constructs a new Vector2 at (x, y) More...
|
|
Vector2 | operator- (const Vector2 &other) const |
| Subtracts two Vector2s and returns the value. More...
|
|
Vector2 | operator+ (const Vector2 &other) const |
| Adds two Vector2s together and returns the value. More...
|
|
Vector2 | operator* (int constant) |
| Multiples the current Vector2 by a scalar and returns a new Vector2 with its value. More...
|
|
Vector2 | operator/ (int constant) |
| Divides the current Vector2 by a scalar and returns a new Vector2 with its value. More...
|
|
bool | operator== (const Vector2 &other) const |
| Checks to see if the current Vector2 equals the other Vector2. More...
|
|
double | x () const |
| Gets the x coordinate of the Vector2. More...
|
|
void | setX (double x) |
| Sets the x coordinate of the Vector2. More...
|
|
double | y () const |
| Gets the y coordinate of the Vector2. More...
|
|
void | setY (double y) |
| Sets the y coordinate of the Vector2. More...
|
|
double | distanceTo (const Vector2 &other) const |
| Computes and returns the distance from the current Vector2 to the other Vector2. More...
|
|
bool | isNorthOf (const Vector2 &other) const |
| Checks if the current Vector2 is north of the other Vector2. More...
|
|
bool | isNorthWestOf (const Vector2 &other) const |
| Checks if the current Vector2 is north west of the other Vector2. More...
|
|
bool | isNorthEastOf (const Vector2 &other) const |
| Checks if the current Vector2 is north east of the other Vector2. More...
|
|
bool | isSouthOf (const Vector2 &other) const |
| Checks if the current Vector2 is south of the other Vector2. More...
|
|
bool | isSouthWestOf (const Vector2 &other) const |
| Checks if the current Vector2 is south west of the other Vector2. More...
|
|
bool | isSouthEastOf (const Vector2 &other) const |
| Checks if the current Vector2 is south east of the other Vector2. More...
|
|
bool | isWestOf (const Vector2 &other) const |
| Checks if the current Vector2 is west of the other Vector2. More...
|
|
bool | isEastOf (const Vector2 &other) const |
| Checks if the current Vector2 is east of the other Vector2. More...
|
|
double | dotProduct (const Vector2 &other) const |
| Computes and returns the dot product of the current Vector2 and other Vector2. More...
|
|
double | crossProduct (const Vector2 &other) const |
| Computes and returns the cross product of the current Vector2 and the other Vector2. More...
|
|
Vector2 | projectionOn (const Vector2 &b) const |
| Computes and returns the projection of the current Vector2 onto b. More...
|
|
double | length () const |
| Computes and returns the length of the Vector2 from the origin. More...
|
|
double | length2 () const |
| Computes and returns the length^2 of the Vector2 from the origin. More...
|
|
double | magnitude () const |
| Computes and returns the magnitude of the Vector2. More...
|
|
Vector2 | normalize () const |
| Computes and returns the normalized form of the current Vector2. More...
|
|
Vector2 | leftHandNormal () const |
| Computes and returns the left hand normal of the current Vector2. More...
|
|
Vector2 | rightHandNormal () const |
| Computes and returns the right hand normal of the current Vector2. More...
|
|