1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Refactored Variant Operators.

-Using classes to call and a table
-For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
This commit is contained in:
reduz
2020-11-04 23:01:55 -03:00
parent 391d29f558
commit f2397809a8
26 changed files with 5322 additions and 4507 deletions

View File

@@ -233,6 +233,19 @@ void Vector2i::operator/=(const int &rvalue) {
y /= rvalue;
}
Vector2i Vector2i::operator%(const Vector2i &p_v1) const {
return Vector2i(x % p_v1.x, y % p_v1.y);
}
Vector2i Vector2i::operator%(const int &rvalue) const {
return Vector2i(x % rvalue, y % rvalue);
}
void Vector2i::operator%=(const int &rvalue) {
x %= rvalue;
y %= rvalue;
}
Vector2i Vector2i::operator-() const {
return Vector2i(-x, -y);
}