compare to SIMD_EPSILON.

This commit is contained in:
Matt Bennice
2022-08-11 14:00:12 -07:00
parent 555c0c6cd9
commit ee0100abbf

View File

@@ -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));