From ee0100abbfebc19de560700bb4ad73064aa4c982 Mon Sep 17 00:00:00 2001 From: Matt Bennice Date: Thu, 11 Aug 2022 14:00:12 -0700 Subject: [PATCH] compare to SIMD_EPSILON. --- src/BulletSoftBody/btSoftBody.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BulletSoftBody/btSoftBody.cpp b/src/BulletSoftBody/btSoftBody.cpp index 64005cc2c..c873099b4 100644 --- a/src/BulletSoftBody/btSoftBody.cpp +++ b/src/BulletSoftBody/btSoftBody.cpp @@ -2817,7 +2817,7 @@ static void getBarycentric(const btVector3& p, const btVector3& a, const btVecto btScalar d21 = v2.dot(v1); btScalar denom = d00 * d11 - d01 * d01; // In the case of a degenerate triangle, pick a vertex. - if (denom == btScalar(0.0)) + if (btFabs(denom) < SIMD_EPSILON) { bary.setY(btScalar(0.0)); bary.setZ(btScalar(0.0));