18 #include <SDL2/SDL_rect.h>
27 constexpr
point() : SDL_Point{0, 0} {}
29 constexpr
point(
int x,
int y) : SDL_Point{x, y} {}
31 constexpr
point(
const SDL_Point&
p) : SDL_Point{
p} {}
45 return std::tie(x, y) < std::tie(
point.x,
point.y);
84 return {x *
s, y *
s};
96 return {x /
s, y /
s};
110 return {x *
p.x, y *
p.y};
122 return {x /
p.x, y /
p.y};
std::ostream & operator<<(std::ostream &stream, const point &point)
constexpr bool operator==(const point &point) const
constexpr bool operator!=(const point &point) const
constexpr point operator+(const point &point) const
constexpr point operator/(const point &p) const
constexpr point operator*(const point &p) const
constexpr point operator-() const
constexpr point & operator*=(int s)
constexpr point & operator/=(int s)
constexpr bool operator<(const point &point) const
constexpr point & operator+=(const point &point)
constexpr point()
Initialize to 0 by default.
constexpr point operator*(int s) const
constexpr point & operator/=(const point &p)
constexpr bool operator<=(const point &point) const
constexpr point(const SDL_Point &p)
constexpr point(int x, int y)
constexpr point & operator-=(const point &point)
constexpr point operator/(int s) const
constexpr point & operator*=(const point &p)
constexpr point operator-(const point &point) const
static map_location::DIRECTION s