summaryrefslogtreecommitdiff
path: root/core/math/plane.h
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-07-21 21:52:03 +0300
committerGitHub <noreply@github.com>2022-07-21 21:52:03 +0300
commit74be36e622efd2cea912a2ad444fd045a0e79d1e (patch)
treefc3178948fac71c12e4d00cad9c1a824eb5bea26 /core/math/plane.h
parentd6b1dd4854be3b31673e7634d3b88499f3bd2b60 (diff)
parentccc56cc6d483c89905ab995808525f16ed24dd36 (diff)
Merge pull request #63289 from Chaosus/code_style_tolerance
Rename `epsilon` to `tolerance` in the `Plane::has_point` method
Diffstat (limited to 'core/math/plane.h')
-rw-r--r--core/math/plane.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/plane.h b/core/math/plane.h
index 66c1741662..73babfa496 100644
--- a/core/math/plane.h
+++ b/core/math/plane.h
@@ -52,7 +52,7 @@ struct _NO_DISCARD_ Plane {
_FORCE_INLINE_ bool is_point_over(const Vector3 &p_point) const; ///< Point is over plane
_FORCE_INLINE_ real_t distance_to(const Vector3 &p_point) const;
- _FORCE_INLINE_ bool has_point(const Vector3 &p_point, real_t _epsilon = CMP_EPSILON) const;
+ _FORCE_INLINE_ bool has_point(const Vector3 &p_point, real_t p_tolerance = CMP_EPSILON) const;
/* intersections */
@@ -97,10 +97,10 @@ real_t Plane::distance_to(const Vector3 &p_point) const {
return (normal.dot(p_point) - d);
}
-bool Plane::has_point(const Vector3 &p_point, real_t _epsilon) const {
+bool Plane::has_point(const Vector3 &p_point, real_t p_tolerance) const {
real_t dist = normal.dot(p_point) - d;
dist = ABS(dist);
- return (dist <= _epsilon);
+ return (dist <= p_tolerance);
}
Plane::Plane(const Vector3 &p_normal, real_t p_d) :