From 86922ff70ba533b376a6680f965f542894e8c614 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 14 Oct 2019 16:33:45 -0400 Subject: Make is_equal_approx separate for structures This commit adds exposed behavior for C# --- core/math/plane.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/math/plane.cpp') 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); -- cgit v1.2.3