mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-24 15:59:31 +00:00
Add a negation operator for sdl::point.
This commit is contained in:
parent
c6d9565ed1
commit
18c2ad3bf8
@ -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…
x
Reference in New Issue
Block a user