![]() |
KTech 1.1.0
C++ 2D terminal game engine library
|
2D vector, mostly used to store positions and directions. More...
#include <point.hpp>
Public Member Functions | |
constexpr | Point (int32_t x=0, int32_t y=0) |
Construct a Point . | |
constexpr | Point (const UPoint &uPoint) |
Construct a Point from a UPoint . | |
constexpr auto | operator== (const Point &point) const -> bool |
Compare 2 Point s. | |
constexpr auto | operator+ (const Point &point) const -> Point |
Add 2 Point s together. | |
constexpr auto | operator- (const Point &point) const -> Point |
Subtract Point from another. | |
constexpr auto | operator+= (const Point &point) -> Point & |
Add a Point to this Point . | |
constexpr auto | operator-= (const Point &point) -> Point & |
Subtract a Point from this Point . | |
Public Attributes | |
int32_t | x |
X axis (+ right, - left). | |
int32_t | y |
Y axis (+ down, - up). | |
2D vector, mostly used to store positions and directions.
|
inlineconstexpr |
Construct a Point
.
[in] | x | X axis. |
[in] | y | Y axis. |
|
inlineconstexpr |
|
inlineconstexpr |