diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-11 19:48:18 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-11 19:48:18 +0100 |
commit | 141c4831be82654a692d03fdb0fbf87fa27dea88 (patch) | |
tree | 02bc3294cf44e3f962595d05bbdfcc0484d0d9f3 /src/crepe/api/Vector2.cpp | |
parent | ca878336da5cdd120a929e6ce84f565ce5365248 (diff) | |
parent | e42d0877592aa1e88afbe0bc65822cd53a82205d (diff) |
Merge branch 'jaro/particle-system-master' into niels/RenderingParticle
Diffstat (limited to 'src/crepe/api/Vector2.cpp')
-rw-r--r-- | src/crepe/api/Vector2.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/api/Vector2.cpp b/src/crepe/api/Vector2.cpp index 09bb59b..09b3fa3 100644 --- a/src/crepe/api/Vector2.cpp +++ b/src/crepe/api/Vector2.cpp @@ -3,7 +3,7 @@ namespace crepe { // Constructor with initial values -Vector2::Vector2(float x, float y) : x(x), y(y) {} +Vector2::Vector2(double x, double y) : x(x), y(y) {} // Subtracts another vector from this vector and returns the result. Vector2 Vector2::operator-(const Vector2 & other) const { @@ -16,7 +16,7 @@ Vector2 Vector2::operator+(const Vector2 & other) const { } // Multiplies this vector by a scalar and returns the result. -Vector2 Vector2::operator*(float scalar) const { +Vector2 Vector2::operator*(double scalar) const { return {x * scalar, y * scalar}; } @@ -35,7 +35,7 @@ Vector2 & Vector2::operator+=(const Vector2 & other) { } // Adds a scalar value to both components of this vector and updates this vector. -Vector2 & Vector2::operator+=(float other) { +Vector2 & Vector2::operator+=(double other) { x += other; y += other; return *this; |