aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Vector2.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-14 11:10:31 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-14 11:10:31 +0100
commit6e13510f3c6d4155707f748d237bb1fa05243450 (patch)
treeb21ca972d14aac56b7c58c85c54d8a2fd1278a7e /src/crepe/api/Vector2.h
parent319d511135da1b58acb78ca939d7ee01fee4bbf3 (diff)
parentbe1e97bc7a494963ab1567492fafcda99e36f683 (diff)
merge `master` into `loek/audio`
Diffstat (limited to 'src/crepe/api/Vector2.h')
-rw-r--r--src/crepe/api/Vector2.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crepe/api/Vector2.h b/src/crepe/api/Vector2.h
index 741951b..5a57484 100644
--- a/src/crepe/api/Vector2.h
+++ b/src/crepe/api/Vector2.h
@@ -6,15 +6,15 @@ namespace crepe {
class Vector2 {
public:
//! X component of the vector
- float x;
+ double x;
//! Y component of the vector
- float y;
+ double y;
//! Default constructor
Vector2() = default;
//! Constructor with initial values
- Vector2(float x, float y);
+ Vector2(double x, double y);
//! Subtracts another vector from this vector and returns the result.
Vector2 operator-(const Vector2 & other) const;
@@ -23,7 +23,7 @@ public:
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);
@@ -32,7 +32,7 @@ public:
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;