aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/common.hpp')
-rw-r--r--include/common.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/common.hpp b/include/common.hpp
index a7ad6ec..83350d3 100644
--- a/include/common.hpp
+++ b/include/common.hpp
@@ -86,10 +86,15 @@ typedef struct {
int y;
} ivec2;
-typedef struct {
+struct _vec2 {
float x;
float y;
-} vec2;
+
+ bool operator==(const _vec2 &v) {
+ return (x == v.x) && (y == v.y);
+ }
+};
+typedef struct _vec2 vec2;
typedef struct {
float x;