diff options
Diffstat (limited to 'include/common.hpp')
-rw-r--r-- | include/common.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/common.hpp b/include/common.hpp index d13e397..249b9eb 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -105,6 +105,10 @@ struct vec2 { return vec2 (x + n, y + n); } + const vec2 operator+(const vec2 &v) { + return vec2 (x + v.x, y + v.y); + } + template<typename T> const vec2 operator*(const T &n) { return vec2 (x * n, y * n); |