Use builtin Vector2 functions for calculation of angles.
.
This commit is contained in:
parent
c97afc033f
commit
a1f616dcfc
8 changed files with 11 additions and 11 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue