You've already forked godot
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user