diff options
author | lawnjelly <lawnjelly@gmail.com> | 2022-02-24 07:17:00 +0000 |
---|---|---|
committer | lawnjelly <lawnjelly@gmail.com> | 2022-02-24 08:15:10 +0000 |
commit | 1485924a2b90d15949fe544097ce8d00d527e9e7 (patch) | |
tree | 0f1dff59ef994a9b0ea640d3745858b114128fdd /core/math/vector3.cpp | |
parent | cfc7c78732198a7ebc43b92ed24e7025fdf4bc11 (diff) | |
download | redot-engine-1485924a2b90d15949fe544097ce8d00d527e9e7.tar.gz |
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/vector3.cpp')
-rw-r--r-- | core/math/vector3.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index 9b3902346e..87b2ac7104 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -97,7 +97,7 @@ Vector3 Vector3::move_toward(const Vector3 &p_to, const real_t p_delta) const { Vector3 v = *this; Vector3 vd = p_to - v; real_t len = vd.length(); - return len <= p_delta || len < CMP_EPSILON ? p_to : v + vd / len * p_delta; + return len <= p_delta || len < (real_t)CMP_EPSILON ? p_to : v + vd / len * p_delta; } Vector2 Vector3::octahedron_encode() const { |