-remove Vector2.atan2() replaced by Vector2.angle(), fixes #2260

This commit is contained in:
Juan Linietsky 2015-11-19 10:41:20 -03:00
parent 36d620c633
commit d3eb9e8c54
12 changed files with 16 additions and 16 deletions

View file

@ -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;
}

View file

@ -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) {