From 38f14606c78c119d452f302f17329455e29a9a6f Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 10 Mar 2022 19:12:31 +0100 Subject: refactor: rename game initializer & move input config --- src/engine/data/vector2.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/engine/data/vector2.hpp') diff --git a/src/engine/data/vector2.hpp b/src/engine/data/vector2.hpp index 49e5d85..e835e65 100644 --- a/src/engine/data/vector2.hpp +++ b/src/engine/data/vector2.hpp @@ -27,18 +27,24 @@ public: void set_y(Value y) noexcept; + [[nodiscard]] Vector2 to_direction(const Vector2 &direction, + Vector2::Value amount) const noexcept; + const Vector2 &operator+=(const Vector2 &vector2) noexcept; const Vector2 &operator-=(const Vector2 &vector2) noexcept; + Vector2 operator+(const Vector2 &vector2) const noexcept; + Vector2 operator*(const Vector2 &vector2) const noexcept; + bool operator==(const Vector2 &vector2) const noexcept; /** - * Returns Vector2({.x = 0, .y = 1}) + * Returns Vector2({.x = 0, .y = -1}) */ static Vector2 up() noexcept; /** - * Returns Vector2({.x = 0, .y = -1}) + * Returns Vector2({.x = 0, .y = 1}) */ static Vector2 down() noexcept; -- cgit v1.2.3-18-g5258