aboutsummaryrefslogtreecommitdiff
path: root/core/math/vector3.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-24 22:52:46 +0100
committerGitHub2017-03-24 22:52:46 +0100
commit60a9debb99ecb538ab91d76d80ab6f6c22cf4d5f (patch)
tree60dcfd7ebf73bccfa5935ab22e985a621b504e69 /core/math/vector3.h
parent397380e9e5e07b438327b32a84a2e18f67ecf2c1 (diff)
parent3730e0533cceaefe7981387804556810442865e1 (diff)
downloadgodot-60a9debb99ecb538ab91d76d80ab6f6c22cf4d5f.tar.gz
godot-60a9debb99ecb538ab91d76d80ab6f6c22cf4d5f.tar.zst
godot-60a9debb99ecb538ab91d76d80ab6f6c22cf4d5f.zip
Diffstat (limited to 'core/math/vector3.h')
-rw-r--r--core/math/vector3.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 097d6b948..951380e89 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -215,7 +215,7 @@ real_t Vector3::distance_squared_to(const Vector3 &p_b) const {
real_t Vector3::angle_to(const Vector3 &p_b) const {
- return Math::acos(this->dot(p_b) / Math::sqrt(this->length_squared() * p_b.length_squared()));
+ return Math::atan2(cross(p_b).length(), dot(p_b));
}
/* Operators */