#pragma once #include struct Vector2Options { uint32_t x; uint32_t y; }; /** * A 2D Vector. */ class Vector2 { public: /** * Creates a 2D vector. */ explicit Vector2(const Vector2Options &options); /** * Returns the X coordinate. */ [[nodiscard]] uint32_t x() const noexcept; /** * Sets the X coordinate. * * @param x A new X coordinate */ void x(uint32_t x) noexcept; /** * Returns the Y coordinate. */ [[nodiscard]] uint32_t y() const noexcept; /** * Sets the Y coordinate. * * @param Y A new Y coordinate */ void y(uint32_t y) noexcept; const Vector2 &operator+=(const Vector2 &vector2) noexcept; const Vector2 &operator-=(const Vector2 &vector2) noexcept; private: uint32_t _x; uint32_t _y; };