diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-28 16:00:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 16:00:12 +0100 |
commit | 058f3fe069402978780f87ed383e3a72d4b3009e (patch) | |
tree | e0d0fff64ccd8bdc1dda36e7f695b6bc17c5bb52 /core/math | |
parent | 18bbd6410f3ea9fad52fafe3fb90c44c4c130aaa (diff) | |
parent | a24c38d1a814f5bc4979b99d6652f4bf2f2982c7 (diff) |
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/rect2.h | 2 | ||||
-rw-r--r-- | core/math/vector2.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/math/rect2.h b/core/math/rect2.h index 3159447d0a..cc10328357 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -273,7 +273,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++; diff --git a/core/math/vector2.h b/core/math/vector2.h index 33f815a39c..faa26f81bd 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -134,7 +134,7 @@ struct Vector2 { } Vector2 rotated(real_t p_by) const; - Vector2 tangent() const { + Vector2 orthogonal() const { return Vector2(y, -x); } |