summaryrefslogtreecommitdiffstats
path: root/core/math/plane.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2019-10-14 16:33:45 -0400
committerAaron Franke <arnfranke@yahoo.com>2019-10-14 16:46:54 -0400
commit86922ff70ba533b376a6680f965f542894e8c614 (patch)
treeb99bc39067ce17ec257ad44199becdc61b69d3c2 /core/math/plane.cpp
parent1fed266bf5452b30376db62495f4985f6975f2c1 (diff)
downloadredot-engine-86922ff70ba533b376a6680f965f542894e8c614.tar.gz
Make is_equal_approx separate for structures
This commit adds exposed behavior for C#
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);