summaryrefslogtreecommitdiff
path: root/core/math/plane.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/plane.cpp')
-rw-r--r--core/math/plane.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index b01853c4ac..7c501e9f9d 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -161,6 +161,11 @@ bool Plane::is_almost_like(const Plane &p_plane) const {
return (normal.dot(p_plane.normal) > _PLANE_EQ_DOT_EPSILON && Math::absd(d - p_plane.d) < _PLANE_EQ_D_EPSILON);
}
+bool Plane::is_equal_approx(const Plane &p_plane) const {
+
+ return normal.is_equal_approx(p_plane.normal) && Math::is_equal_approx(d, p_plane.d);
+}
+
Plane::operator String() const {
return normal.operator String() + ", " + rtos(d);