diff options
author | chai <chaifix@163.com> | 2018-11-25 00:11:28 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-25 00:11:28 +0800 |
commit | e8e12b11db220160eb63727fb03548410bf3afd2 (patch) | |
tree | a36d62b783e97af9047469955b1aa0ddae6b4627 /src/libjin/math/je_vector2.hpp | |
parent | 42421575d2e17b5c57ff0034c037b651bd6d1119 (diff) |
*misc
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 b4cab44..0a1a1e8 100644 --- a/src/libjin/math/je_vector2.hpp +++ b/src/libjin/math/je_vector2.hpp @@ -48,6 +48,11 @@ namespace JinEngine data[1] = _y; } + bool isZero() + { + return data[0] == 0 && data[1] == 0; + } + T &x = data[0], &y = data[1]; // xy T &w = data[0], &h = data[1]; // wh T &colum = data[0], &row = data[1]; // colum row |