diff options
author | chai <chaifix@163.com> | 2018-11-18 22:32:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-18 22:32:55 +0800 |
commit | fc7b4579e49aaeecc81919e247e03f68bd5abfd4 (patch) | |
tree | 6547b8c7d3632591358267d06006eddc53216105 /src/libjin/Math/je_vector2.hpp | |
parent | 3905924fc35f92e5092576c3f6e8fc5db7588cde (diff) |
*粒子系统
Diffstat (limited to 'src/libjin/Math/je_vector2.hpp')
-rw-r--r-- | src/libjin/Math/je_vector2.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libjin/Math/je_vector2.hpp b/src/libjin/Math/je_vector2.hpp index e9599e1..b4cab44 100644 --- a/src/libjin/Math/je_vector2.hpp +++ b/src/libjin/Math/je_vector2.hpp @@ -31,6 +31,17 @@ namespace JinEngine data[1] = v.data[1]; } + Vector2<T> operator * (float n) + { + return Vector2<T>(data[0]*n, data[1]*n); + } + + void operator +=(const Vector2<T> v) + { + data[0] += v.data[0]; + data[1] += v.data[1]; + } + void set(T _x, T _y) { data[0] = _x; |