mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Level editor work
This commit is contained in:
@@ -13,6 +13,9 @@ struct Point
|
||||
Point operator-(const Point &other) const;
|
||||
Point operator+(const Point &other) const;
|
||||
|
||||
Point &operator-=(const Point &other);
|
||||
Point &operator+=(const Point &other);
|
||||
|
||||
static Point Create(int16_t h, int16_t v);
|
||||
};
|
||||
|
||||
@@ -117,6 +120,20 @@ inline Point Point::operator+(const Point &other) const
|
||||
return Point::Create(this->h + other.h, this->v + other.v);
|
||||
}
|
||||
|
||||
inline Point &Point::operator-=(const Point &other)
|
||||
{
|
||||
this->h -= other.h;
|
||||
this->v -= other.v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Point &Point::operator+=(const Point &other)
|
||||
{
|
||||
this->h += other.h;
|
||||
this->v += other.v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Point Point::Create(int16_t h, int16_t v)
|
||||
{
|
||||
Point p;
|
||||
|
Reference in New Issue
Block a user