-remove Vector2.atan2() replaced by Vector2.angle(), fixes #2260
This commit is contained in:
parent
36d620c633
commit
d3eb9e8c54
12 changed files with 16 additions and 16 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue