summaryrefslogtreecommitdiffstats
path: root/core/math/vector2.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-09-24 13:04:42 +0200
committerGitHub <noreply@github.com>2021-09-24 13:04:42 +0200
commit32ab77ef8f537b2f2d0e4c6c0e6127ea9c2a20f4 (patch)
treea2753d806d05877c5d353bef2049ed822d4ca27a /core/math/vector2.cpp
parentb8a6eb6d9b8eeb29db37d9ddfb6b48947b8a92a7 (diff)
parenta1f616dcfc9b4efa08a5e69e1b979ea7911dc1f8 (diff)
downloadredot-engine-32ab77ef8f537b2f2d0e4c6c0e6127ea9c2a20f4.tar.gz
Merge pull request #52430 from AnilBK/vector2-replacements
Diffstat (limited to 'core/math/vector2.cpp')
-rw-r--r--core/math/vector2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index b53dc05a00..16e43d7d06 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -79,7 +79,7 @@ real_t Vector2::angle_to(const Vector2 &p_vector2) const {
}
real_t Vector2::angle_to_point(const Vector2 &p_vector2) const {
- return Math::atan2(y - p_vector2.y, x - p_vector2.x);
+ return (*this - p_vector2).angle();
}
real_t Vector2::dot(const Vector2 &p_other) const {