Rename Vector2.tangent() to Vector2.orthogonal()
This commit is contained in:
+1
-1
@@ -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
@@ -134,7 +134,7 @@ struct Vector2 {
|
||||
}
|
||||
|
||||
Vector2 rotated(real_t p_by) const;
|
||||
Vector2 tangent() const {
|
||||
Vector2 orthogonal() const {
|
||||
return Vector2(y, -x);
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user