aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Vector2.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-13 19:32:14 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-13 19:32:14 +0100
commit56cf219a25e66f38c50a51afd01ed515de149711 (patch)
tree016293d4e13fa2e141a960062e005b608ccecebf /src/crepe/api/Vector2.h
parentd69f1642cb397d68d591718f83028e14620ab340 (diff)
parent0b2ca3c323c7f73d031e7014ba0a17dcf0b59751 (diff)
merge `jaro/particle-system-master` into `loek/cleanup` early
Diffstat (limited to 'src/crepe/api/Vector2.h')
-rw-r--r--src/crepe/api/Vector2.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/Vector2.h b/src/crepe/api/Vector2.h
index a069a57..2fb6136 100644
--- a/src/crepe/api/Vector2.h
+++ b/src/crepe/api/Vector2.h
@@ -5,9 +5,9 @@ namespace crepe {
//! 2D vector
struct Vector2 {
//! X component of the vector
- float x = 0;
+ double x = 0;
//! Y component of the vector
- float y = 0;
+ double y = 0;
//! Subtracts another vector from this vector and returns the result.
Vector2 operator-(const Vector2 & other) const;
@@ -16,7 +16,7 @@ struct Vector2 {
Vector2 operator+(const Vector2 & other) const;
//! Multiplies this vector by a scalar and returns the result.
- Vector2 operator*(float scalar) const;
+ Vector2 operator*(double scalar) const;
//! Multiplies this vector by another vector element-wise and updates this vector.
Vector2 & operator*=(const Vector2 & other);
@@ -25,7 +25,7 @@ struct Vector2 {
Vector2 & operator+=(const Vector2 & other);
//! Adds a scalar value to both components of this vector and updates this vector.
- Vector2 & operator+=(float other);
+ Vector2 & operator+=(double other);
//! Returns the negation of this vector.
Vector2 operator-() const;