diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-03-01 01:32:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 01:32:07 +0100 |
commit | de9446186dd00027921affc4183f19ab1c224322 (patch) | |
tree | 89916d57c088a6a34527713cf69934c4ff2d83af /core/math/plane.cpp | |
parent | 9458a8f74254f1fe7f227ab92fbc3b8c9cbaa64a (diff) | |
parent | 1485924a2b90d15949fe544097ce8d00d527e9e7 (diff) | |
download | redot-engine-de9446186dd00027921affc4183f19ab1c224322.tar.gz |
Merge pull request #58488 from lawnjelly/float_literals_casts
Diffstat (limited to 'core/math/plane.cpp')
-rw-r--r-- | core/math/plane.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/plane.cpp b/core/math/plane.cpp index 0ce8aed51c..6881ad4014 100644 --- a/core/math/plane.cpp +++ b/core/math/plane.cpp @@ -106,7 +106,7 @@ bool Plane::intersects_ray(const Vector3 &p_from, const Vector3 &p_dir, Vector3 real_t dist = (normal.dot(p_from) - d) / den; //printf("dist is %i\n",dist); - if (dist > CMP_EPSILON) { //this is a ray, before the emitting pos (p_from) doesn't exist + if (dist > (real_t)CMP_EPSILON) { //this is a ray, before the emitting pos (p_from) doesn't exist return false; } @@ -129,7 +129,7 @@ bool Plane::intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vec real_t dist = (normal.dot(p_begin) - d) / den; //printf("dist is %i\n",dist); - if (dist < -CMP_EPSILON || dist > (1.0f + CMP_EPSILON)) { + if (dist < (real_t)-CMP_EPSILON || dist > (1.0f + (real_t)CMP_EPSILON)) { return false; } |