diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/math/math_2d.cpp | 4 | ||||
-rw-r--r-- | core/math/math_2d.h | 2 | ||||
-rw-r--r-- | core/variant_call.cpp | 4 |
3 files changed, 5 insertions, 5 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) { diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 7bbb18225d..51d683f1fe 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -333,7 +333,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1R(Vector2,dot); VCALL_LOCALMEM1R(Vector2,slide); VCALL_LOCALMEM1R(Vector2,reflect); - VCALL_LOCALMEM0R(Vector2,atan2); + VCALL_LOCALMEM0R(Vector2,angle); // VCALL_LOCALMEM1R(Vector2,cross); VCALL_LOCALMEM0R(Rect2,get_area); @@ -1297,7 +1297,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(VECTOR2,VECTOR2,Vector2,normalized,varray()); ADDFUNC0(VECTOR2,REAL,Vector2,length,varray()); - ADDFUNC0(VECTOR2,REAL,Vector2,atan2,varray()); + ADDFUNC0(VECTOR2,REAL,Vector2,angle,varray()); ADDFUNC0(VECTOR2,REAL,Vector2,length_squared,varray()); ADDFUNC1(VECTOR2,REAL,Vector2,distance_to,VECTOR2,"to",varray()); ADDFUNC1(VECTOR2,REAL,Vector2,distance_squared_to,VECTOR2,"to",varray()); |