Vec2i, IntRect: Add unequal operator
This commit is contained in:
parent
21247b18b5
commit
d1ee507ec4
|
@ -88,6 +88,11 @@ struct Vec2i
|
|||
return x == other.x && y == other.y;
|
||||
}
|
||||
|
||||
bool operator!=(const Vec2i &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
Vec2i &operator+=(const Vec2i &value)
|
||||
{
|
||||
x += value.x;
|
||||
|
@ -176,6 +181,11 @@ struct IntRect : SDL_Rect
|
|||
w == other.w && h == other.h);
|
||||
}
|
||||
|
||||
bool operator!=(const IntRect &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
Vec2i pos() const
|
||||
{
|
||||
return Vec2i(x, y);
|
||||
|
|
Loading…
Reference in New Issue