diff options
Diffstat (limited to 'src/engine/data/vector2.hpp')
-rw-r--r-- | src/engine/data/vector2.hpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/engine/data/vector2.hpp b/src/engine/data/vector2.hpp index 78eba11..95baf1c 100644 --- a/src/engine/data/vector2.hpp +++ b/src/engine/data/vector2.hpp @@ -22,30 +22,30 @@ public: { } - [[nodiscard]] Value get_x() const noexcept; + [[nodiscard]] auto get_x() const noexcept -> Value; void set_x(Value x) noexcept; - [[nodiscard]] Value get_y() const noexcept; + [[nodiscard]] auto get_y() const noexcept -> Value; void set_y(Value y) noexcept; - [[nodiscard]] Vector2 to_direction(const Vector2 &direction, - Vector2::Value amount) const noexcept; + [[nodiscard]] auto to_direction(const Vector2 &direction, + Vector2::Value amount) const noexcept -> Vector2; - const Vector2 &operator+=(const Vector2 &rhs) noexcept; - const Vector2 &operator-=(const Vector2 &rhs) noexcept; + auto operator+=(const Vector2 &rhs) noexcept -> const Vector2 &; + auto operator-=(const Vector2 &rhs) noexcept -> const Vector2 &; - Vector2 operator+(const Vector2 &rhs) const noexcept; - Vector2 operator-(const Vector2 &rhs) const noexcept; - Vector2 operator*(const Vector2 &rhs) const noexcept; + auto operator+(const Vector2 &rhs) const noexcept -> Vector2; + auto operator-(const Vector2 &rhs) const noexcept -> Vector2; + auto operator*(const Vector2 &rhs) const noexcept -> Vector2; - bool operator==(const Vector2 &rhs) const noexcept; + auto operator==(const Vector2 &rhs) const noexcept -> bool; /** * Returns Vector2({.x = 0, .y = -1}) */ - static constexpr Vector2 up() noexcept + static constexpr auto up() noexcept -> Vector2 { return Vector2({.x = 0, .y = -1}); } @@ -53,7 +53,7 @@ public: /** * Returns Vector2({.x = 0, .y = 1}) */ - static constexpr Vector2 down() noexcept + static constexpr auto down() noexcept -> Vector2 { return Vector2({.x = 0, .y = 1}); } @@ -61,7 +61,7 @@ public: /** * Returns Vector2({.x = -1, .y = 0}) */ - static constexpr Vector2 left() noexcept + static constexpr auto left() noexcept -> Vector2 { return Vector2({.x = -1, .y = 0}); @@ -70,7 +70,7 @@ public: /** * Returns Vector2({.x = 1, .y = 0}) */ - static constexpr Vector2 right() noexcept + static constexpr auto right() noexcept -> Vector2 { return Vector2({.x = 1, .y = 0}); } @@ -83,5 +83,5 @@ private: class Vector2Hasher { public: - std::size_t operator()(const Vector2 &vector2) const noexcept; + auto operator()(const Vector2 &vector2) const noexcept -> std::size_t; }; |