summaryrefslogtreecommitdiffstats
path: root/core/math/face3.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-03-01 01:32:07 +0100
committerGitHub <noreply@github.com>2022-03-01 01:32:07 +0100
commitde9446186dd00027921affc4183f19ab1c224322 (patch)
tree89916d57c088a6a34527713cf69934c4ff2d83af /core/math/face3.cpp
parent9458a8f74254f1fe7f227ab92fbc3b8c9cbaa64a (diff)
parent1485924a2b90d15949fe544097ce8d00d527e9e7 (diff)
downloadredot-engine-de9446186dd00027921affc4183f19ab1c224322.tar.gz
Merge pull request #58488 from lawnjelly/float_literals_casts
Diffstat (limited to 'core/math/face3.cpp')
-rw-r--r--core/math/face3.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index 9c968df19b..5bc1bc25e6 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -42,7 +42,7 @@ int Face3::split_by_plane(const Plane &p_plane, Face3 p_res[3], bool p_is_point_
int below_count = 0;
for (int i = 0; i < 3; i++) {
- if (p_plane.has_point(vertex[i], CMP_EPSILON)) { // point is in plane
+ if (p_plane.has_point(vertex[i], (real_t)CMP_EPSILON)) { // point is in plane
ERR_FAIL_COND_V(above_count >= 4, 0);
above[above_count++] = vertex[i];
@@ -117,7 +117,7 @@ bool Face3::intersects_segment(const Vector3 &p_from, const Vector3 &p_dir, Vect
bool Face3::is_degenerate() const {
Vector3 normal = vec3_cross(vertex[0] - vertex[1], vertex[0] - vertex[2]);
- return (normal.length_squared() < CMP_EPSILON2);
+ return (normal.length_squared() < (real_t)CMP_EPSILON2);
}
Face3::Side Face3::get_side_of(const Face3 &p_face, ClockDirection p_clock_dir) const {