From 12fffa7df0685ef6d23ffe888a06695ae490df81 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 7 Mar 2022 19:08:08 +0100 Subject: refactor: make vector2 data int32_t --- src/engine/data/vector2.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/engine/data/vector2.hpp') 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; }; -- cgit v1.2.3-18-g5258