Use approximate equallity methods in many places

This commit is contained in:
Aaron Franke
2019-01-16 10:42:53 -05:00
parent c577ec6ae4
commit b659e1eb2b
21 changed files with 66 additions and 66 deletions

View File

@@ -836,7 +836,7 @@ Geometry::MeshData Geometry::build_convex_mesh(const PoolVector<Plane> &p_planes
Vector3 rel = edge1_A - edge0_A;
real_t den = clip.normal.dot(rel);
if (Math::abs(den) < CMP_EPSILON)
if (Math::is_zero_approx(den))
continue; // point too short
real_t dist = -(clip.normal.dot(edge0_A) - clip.d) / den;