diff options
author | reduz <reduzio@gmail.com> | 2020-11-04 23:01:55 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2020-11-06 12:45:50 -0300 |
commit | f2397809a84c2bf0d41e6cb2092fa8f3c5a17850 (patch) | |
tree | 1eb1930e9124c5ecf77840e80ebed64cbb85608c /core/math/vector2.h | |
parent | 391d29f558d122798416b5957660d9eeceecd0f5 (diff) | |
download | redot-engine-f2397809a84c2bf0d41e6cb2092fa8f3c5a17850.tar.gz |
Refactored Variant Operators.
-Using classes to call and a table
-For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r-- | core/math/vector2.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/math/vector2.h b/core/math/vector2.h index c2a2656e72..31bb7208d3 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -290,11 +290,13 @@ struct Vector2i { void operator*=(const int &rvalue); Vector2i operator/(const Vector2i &p_v1) const; - Vector2i operator/(const int &rvalue) const; - void operator/=(const int &rvalue); + Vector2i operator%(const Vector2i &p_v1) const; + Vector2i operator%(const int &rvalue) const; + void operator%=(const int &rvalue); + Vector2i operator-() const; bool operator<(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y < p_vec2.y) : (x < p_vec2.x); } bool operator>(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y > p_vec2.y) : (x > p_vec2.x); } |