From 1d54138b94a384917d47abd8109c586b1b7ac323 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 25 Nov 2018 13:08:56 +0800 Subject: =?UTF-8?q?*=E7=B2=92=E5=AD=90=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/math/je_vector2.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libjin/math/je_vector2.hpp') 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 operator +(const Vector2& v) + { + return Vector2(data[0] + v.data[0], data[1] + v.data[1]); + } + void set(T _x, T _y) { data[0] = _x; -- cgit v1.1-26-g67d0