aboutsummaryrefslogtreecommitdiff
path: root/core/math/quat.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-04-24 11:16:20 +0200
committerGitHub2017-04-24 11:16:20 +0200
commit5ae1e172da08a63b14635f5d06e32385901525e2 (patch)
tree9a9bd7f4dd90eada323f504b551e7630802fa494 /core/math/quat.cpp
parent90ef1fd03d43d51f09b730dee107c0e407cf0703 (diff)
parent9a37ff1e34fe445a9168a7d91ae1df7d9928eb25 (diff)
downloadgodot-5ae1e172da08a63b14635f5d06e32385901525e2.tar.gz
godot-5ae1e172da08a63b14635f5d06e32385901525e2.tar.zst
godot-5ae1e172da08a63b14635f5d06e32385901525e2.zip
Diffstat (limited to 'core/math/quat.cpp')
-rw-r--r--core/math/quat.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/quat.cpp b/core/math/quat.cpp
index 966254222..0bea97c2e 100644
--- a/core/math/quat.cpp
+++ b/core/math/quat.cpp
@@ -92,6 +92,10 @@ Quat Quat::normalized() const {
return *this / length();
}
+bool Quat::is_normalized() const {
+ return Math::is_equal_approx(length(), 1.0);
+}
+
Quat Quat::inverse() const {
return Quat(-x, -y, -z, w);
}