Add a negation operator for sdl::point.
This commit is contained in:
parent
c6d9565ed1
commit
18c2ad3bf8
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,11 @@ struct point : SDL_Point
|
|||
return *this;
|
||||
}
|
||||
|
||||
constexpr point operator-() const
|
||||
{
|
||||
return {-x, -y};
|
||||
}
|
||||
|
||||
constexpr point operator-(const point& point) const
|
||||
{
|
||||
return {x - point.x, y - point.y};
|
||||
|
|
Loading…
Add table
Reference in a new issue