diff options
Diffstat (limited to 'src/libjin/math/je_vector2.hpp')
-rw-r--r-- | src/libjin/math/je_vector2.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libjin/math/je_vector2.hpp b/src/libjin/math/je_vector2.hpp index 0a1a1e8..406b756 100644 --- a/src/libjin/math/je_vector2.hpp +++ b/src/libjin/math/je_vector2.hpp @@ -42,6 +42,11 @@ namespace JinEngine data[1] += v.data[1]; } + Vector2<T> operator +(const Vector2<T>& v) + { + return Vector2<T>(data[0] + v.data[0], data[1] + v.data[1]); + } + void set(T _x, T _y) { data[0] = _x; |