summaryrefslogtreecommitdiff
path: root/core/math/quaternion.cpp
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2022-02-24 07:17:00 +0000
committerlawnjelly <lawnjelly@gmail.com>2022-02-24 08:15:10 +0000
commit1485924a2b90d15949fe544097ce8d00d527e9e7 (patch)
tree0f1dff59ef994a9b0ea640d3745858b114128fdd /core/math/quaternion.cpp
parentcfc7c78732198a7ebc43b92ed24e7025fdf4bc11 (diff)
Float literals - fix main primitives to use real_t casting
Uses (real_t) casting to ensure appropriate calculations are done in 32 bit where real_t is compiled as 32 bit.
Diffstat (limited to 'core/math/quaternion.cpp')
-rw-r--r--core/math/quaternion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/quaternion.cpp b/core/math/quaternion.cpp
index ade252d628..0a650a8578 100644
--- a/core/math/quaternion.cpp
+++ b/core/math/quaternion.cpp
@@ -129,7 +129,7 @@ Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) con
// calculate coefficients
- if ((1.0f - cosom) > CMP_EPSILON) {
+ if ((1.0f - cosom) > (real_t)CMP_EPSILON) {
// standard case (slerp)
omega = Math::acos(cosom);
sinom = Math::sin(omega);