summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-11-19 10:41:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-11-19 10:41:20 -0300
commitd3eb9e8c54d4a93b2bed90a5988f9814377d409f (patch)
treea8586037e25eb481fb386745bbcd9a63ced46898 /scene
parent36d620c633be55ac402892bce816d4a9b4d67bee (diff)
-remove Vector2.atan2() replaced by Vector2.angle(), fixes #2260
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/node_2d.cpp2
-rw-r--r--scene/2d/path_2d.cpp2
-rw-r--r--scene/2d/ray_cast_2d.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 6141b6a09e..52b112f090 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -354,7 +354,7 @@ void Node2D::look_at(const Vector2& p_pos) {
float Node2D::get_angle_to(const Vector2& p_pos) const {
- return (get_global_transform().affine_inverse().xform(p_pos)).atan2();
+ return (get_global_transform().affine_inverse().xform(p_pos)).angle();
}
void Node2D::_bind_methods() {
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 7ba1bb28b6..8f110b3931 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -118,7 +118,7 @@ void PathFollow2D::_update_transform() {
pos+=n*h_offset;
pos+=t*v_offset;
- set_rot(t.atan2());
+ set_rot(t.angle());
} else {
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index acc4c620e6..4a199e3418 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -131,7 +131,7 @@ void RayCast2D::_notification(int p_what) {
if (!get_tree()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint())
break;
Matrix32 xf;
- xf.rotate(cast_to.atan2());
+ xf.rotate(cast_to.angle());
xf.translate(Vector2(0,cast_to.length()));
//Vector2 tip = Vector2(0,s->get_length());