summaryrefslogtreecommitdiff
path: root/src/helpers/Vector2D.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-24 11:22:44 +0200
committerGitHub <noreply@github.com>2022-04-24 11:22:44 +0200
commit6679a4786b593cbe5050931261566fab9aa77f1f (patch)
treea090b5c34cb75d4328c79f587018457a5e589c0a /src/helpers/Vector2D.hpp
parentfc14157d765ce44e634525b2c437808e20ec93d6 (diff)
parent1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a (diff)
Merge pull request #55 from vaxerski/animation-system-rework
Animation system rework
Diffstat (limited to 'src/helpers/Vector2D.hpp')
-rw-r--r--src/helpers/Vector2D.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helpers/Vector2D.hpp b/src/helpers/Vector2D.hpp
index 5fe4ccd3..7288a088 100644
--- a/src/helpers/Vector2D.hpp
+++ b/src/helpers/Vector2D.hpp
@@ -14,24 +14,24 @@ class Vector2D {
// returns the scale
double normalize();
- Vector2D operator+(const Vector2D a) {
+ Vector2D operator+(const Vector2D a) const {
return Vector2D(this->x + a.x, this->y + a.y);
}
- Vector2D operator-(const Vector2D a) {
+ Vector2D operator-(const Vector2D a) const {
return Vector2D(this->x - a.x, this->y - a.y);
}
- Vector2D operator*(const float a) {
+ Vector2D operator*(const float a) const {
return Vector2D(this->x * a, this->y * a);
}
- Vector2D operator/(const float a) {
+ Vector2D operator/(const float a) const {
return Vector2D(this->x / a, this->y / a);
}
- bool operator==(const Vector2D& a) {
+ bool operator==(const Vector2D& a) const {
return a.x == x && a.y == y;
}
- bool operator!=(const Vector2D& a) {
+ bool operator!=(const Vector2D& a) const {
return a.x != x || a.y != y;
}