mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 22:31:49 +01:00
Collision reworked into a Collision Namespace
Added basic player (Needs work)
This commit is contained in:
@@ -23,6 +23,9 @@ Point2f::Point2f(float x, float y)
|
||||
Point2f Point2f::operator+(const Point2f& other) const {
|
||||
return Point2f { x + other.x, y + other.y };
|
||||
}
|
||||
Point2f Point2f::operator+=(const Point2f& other) const {
|
||||
return Point2f { x + other.x, y + other.y };
|
||||
}
|
||||
Point2f Point2f::operator*(float other) const {
|
||||
return Point2f { x * other, y * other };
|
||||
}
|
||||
@@ -35,11 +38,20 @@ Point2f Point2f::operator*(int other) const {
|
||||
Point2f Point2f::operator/(float other) const {
|
||||
return Point2f { x / other, y / other };
|
||||
}
|
||||
Point2f Point2f::operator-(const Point2f& other) const {
|
||||
return Point2f { x - other.x, y - other.y };
|
||||
}
|
||||
|
||||
// Point2f::Point2f(int x, int y)
|
||||
// : x { (float)x }, y { (float)y } {
|
||||
// }
|
||||
|
||||
Point2f operator/(float right, const Point2f& left) {
|
||||
return Point2f { right / left.x, right / left.y };
|
||||
}
|
||||
Point2f operator*(float right, const Point2f& left) {
|
||||
return Point2f{ right * left.x, right * left.y };
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
// Rectf Constructors
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user