diff options
| author | Rémi Verschelde | 2016-10-03 13:53:46 +0200 |
|---|---|---|
| committer | GitHub | 2016-10-03 13:53:46 +0200 |
| commit | 917f5e9bbc688214755f723e4c03cd471fb795d5 (patch) | |
| tree | cc3b2759189fb1db45b860c090576298577dfc99 /core/math/vector3.cpp | |
| parent | c46e205237192ed58e21f13d90d7b6a75c7570ba (diff) | |
| parent | deb36b44d1a67157a44695ed7519605f431a3d89 (diff) | |
| download | godot-917f5e9bbc688214755f723e4c03cd471fb795d5.tar.gz godot-917f5e9bbc688214755f723e4c03cd471fb795d5.tar.zst godot-917f5e9bbc688214755f723e4c03cd471fb795d5.zip | |
Merge pull request #6675 from J08nY/issue-vector3-angle-to
Adds Vector.angle_to(Vector other), fixes #3912
[ci skip]
Diffstat (limited to 'core/math/vector3.cpp')
| -rw-r--r-- | core/math/vector3.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index b4a13d8f6..fae3831dd 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -49,13 +49,13 @@ void Vector3::set_axis(int p_axis,real_t p_value) { } real_t Vector3::get_axis(int p_axis) const { - ERR_FAIL_INDEX_V(p_axis,3,0); - return operator[](p_axis); + ERR_FAIL_INDEX_V(p_axis,3,0); + return operator[](p_axis); } int Vector3::min_axis() const { - return x < y ? (x < z ? 0 : 2) : (y < z ? 1 : 2); + return x < y ? (x < z ? 0 : 2) : (y < z ? 1 : 2); } int Vector3::max_axis() const { @@ -71,9 +71,9 @@ void Vector3::snap(float p_val) { } Vector3 Vector3::snapped(float p_val) const { - Vector3 v=*this; - v.snap(p_val); - return v; + Vector3 v=*this; + v.snap(p_val); + return v; } |
