Platformer
Platformer
Vector2.hpp
1 #ifndef VECTOR_2_HPP
2 #define VECTOR_2_HPP
3 
8 class Vector2 {
9  public:
10 
12  Vector2();
13 
15  Vector2(
16  int x,
18  int y);
19 
21  void operator+=(const Vector2& other);
22 
27  Vector2 operator*(const int other);
28 
30  int x;
32  int y;
33 };
34 
35 #endif
int y
The y coordinate of the vector.
Definition: Vector2.hpp:32
Vector2()
Constructs a default Vector2.
Definition: Vector2.cpp:3
Basic class representation of a vector 2 with an x and y coordinate.
Definition: Vector2.hpp:8
Vector2 operator*(const int other)
Multiplies two vectors together.
Definition: Vector2.cpp:12
int x
The x coordinate of the vector.
Definition: Vector2.hpp:30
void operator+=(const Vector2 &other)
Adds two vectors together.
Definition: Vector2.cpp:7