aboutsummaryrefslogtreecommitdiff
path: root/src/engine/data/vector2.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-07 19:08:08 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:55 +0200
commit12fffa7df0685ef6d23ffe888a06695ae490df81 (patch)
treeffdc24e482b7d4610bdec6f1ebb8ccc0800c5ee5 /src/engine/data/vector2.hpp
parenta9a4381398098107d1b359a19338e91651605de8 (diff)
refactor: make vector2 data int32_t
Diffstat (limited to 'src/engine/data/vector2.hpp')
-rw-r--r--src/engine/data/vector2.hpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/engine/data/vector2.hpp b/src/engine/data/vector2.hpp
index a7896ef..acfe11f 100644
--- a/src/engine/data/vector2.hpp
+++ b/src/engine/data/vector2.hpp
@@ -4,8 +4,8 @@
struct Vector2Options
{
- uint32_t x;
- uint32_t y;
+ int32_t x;
+ int32_t y;
};
/**
@@ -16,18 +16,18 @@ class Vector2
public:
explicit Vector2(const Vector2Options &options);
- [[nodiscard]] uint32_t get_x() const noexcept;
+ [[nodiscard]] int32_t get_x() const noexcept;
- void set_x(uint32_t x) noexcept;
+ void set_x(int32_t x) noexcept;
- [[nodiscard]] uint32_t get_y() const noexcept;
+ [[nodiscard]] int32_t get_y() const noexcept;
- void set_y(uint32_t y) noexcept;
+ void set_y(int32_t y) noexcept;
const Vector2 &operator+=(const Vector2 &vector2) noexcept;
const Vector2 &operator-=(const Vector2 &vector2) noexcept;
private:
- uint32_t _x;
- uint32_t _y;
+ int32_t _x;
+ int32_t _y;
};