diff --git a/common/utilities/vector2.hpp b/common/utilities/vector2.hpp index e1688d4..00f4a06 100644 --- a/common/utilities/vector2.hpp +++ b/common/utilities/vector2.hpp @@ -92,6 +92,10 @@ public: return ret; } + //unary operators + Vector2 operator-() { return {-x, -y}; } + + //comparison operators bool operator==(Vector2 v) { return (x == v.x && y == v.y); } bool operator!=(Vector2 v) { return (x != v.x || y != v.y); }