aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-04-23 22:31:27 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-04-23 22:31:27 -0400
commitcc2230e0039f06a7478878adcbc9ef028a223243 (patch)
tree1af80e53bc7f6ec6fa7c7d4f89656d61f203808f /include/common.hpp
parentdebb080a17eba2b2957e99ba7f1ce0fa0c4d2e4e (diff)
more rewrites
Diffstat (limited to 'include/common.hpp')
-rw-r--r--include/common.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/common.hpp b/include/common.hpp
index 310bf7f..9211d56 100644
--- a/include/common.hpp
+++ b/include/common.hpp
@@ -98,6 +98,11 @@ struct _vec2 {
bool operator==(const _vec2 &v) {
return (x == v.x) && (y == v.y);
}
+ template<typename T>
+ const _vec2 operator=(const T &n) {
+ x = y = n;
+ return *this;
+ }
};
typedef struct _vec2 vec2;