Rename Vector2.tangent() to Vector2.orthogonal()

This commit is contained in:
Marcel Admiraal
2020-12-06 18:16:06 +00:00
parent d834789f47
commit a24c38d1a8
21 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ struct Rect2 {
}
//check inside
Vector2 tg = r.tangent();
Vector2 tg = r.orthogonal();
float s = tg.dot(center) - tg.dot(a);
if (s < 0.0) {
side_plus++;
+1 -1
View File
@@ -134,7 +134,7 @@ struct Vector2 {
}
Vector2 rotated(real_t p_by) const;
Vector2 tangent() const {
Vector2 orthogonal() const {
return Vector2(y, -x);
}
+1 -1
View File
@@ -992,7 +992,7 @@ static void _register_variant_builtin_methods() {
bind_method(Vector2, cubic_interpolate, sarray("b", "pre_a", "post_b", "t"), varray());
bind_method(Vector2, move_toward, sarray("to", "delta"), varray());
bind_method(Vector2, rotated, sarray("phi"), varray());
bind_method(Vector2, tangent, sarray(), varray());
bind_method(Vector2, orthogonal, sarray(), varray());
bind_method(Vector2, floor, sarray(), varray());
bind_method(Vector2, ceil, sarray(), varray());
bind_method(Vector2, round, sarray(), varray());