summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
Diffstat (limited to 'core/math')
-rw-r--r--core/math/math_2d.cpp4
-rw-r--r--core/math/math_2d.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp
index 88717723ce..ce03f089e5 100644
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -29,7 +29,7 @@
#include "math_2d.h"
-real_t Vector2::atan2() const {
+real_t Vector2::angle() const {
return Math::atan2(x,y);
}
@@ -165,7 +165,7 @@ Vector2 Vector2::floor() const {
Vector2 Vector2::rotated(float p_by) const {
Vector2 v;
- v.set_rotation(atan2()+p_by);
+ v.set_rotation(angle()+p_by);
v*=length();
return v;
}
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index 5e6cefd114..3d40e24091 100644
--- a/core/math/math_2d.h
+++ b/core/math/math_2d.h
@@ -133,7 +133,7 @@ struct Vector2 {
bool operator<(const Vector2& p_vec2) const { return (x==p_vec2.x)?(y<p_vec2.y):(x<p_vec2.x); }
bool operator<=(const Vector2& p_vec2) const { return (x==p_vec2.x)?(y<=p_vec2.y):(x<=p_vec2.x); }
- real_t atan2() const;
+ real_t angle() const;
void set_rotation(float p_radians) {