Platformer
Platformer
|
Basic class representation of a vector 2 with an x and y coordinate. More...
#include <Vector2.hpp>
Public Member Functions | |
Vector2 () | |
Constructs a default Vector2. | |
Vector2 (int x, int y) | |
Constructs a Vector2 with the given coordinates. More... | |
void | operator+= (const Vector2 &other) |
Adds two vectors together. | |
Vector2 | operator* (const int other) |
Multiplies two vectors together. More... | |
Public Attributes | |
int | x |
The x coordinate of the vector. | |
int | y |
The y coordinate of the vector. | |
Basic class representation of a vector 2 with an x and y coordinate.
Vector2::Vector2 | ( | int | x, |
int | y | ||
) |
Constructs a Vector2 with the given coordinates.
x | The x coordinate of the vector |
y | The y coordinate of the vector |
Vector2 Vector2::operator* | ( | const int | other | ) |
Multiplies two vectors together.