1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-11-08 13:40:09 +00:00

Fix two triangles intersect with intersection distances close to zero (#197) (#198)

This commit is contained in:
Fabian Weber 2024-09-05 00:47:42 +02:00 committed by GitHub
parent ce4eb221f2
commit 4bf02b8b2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4491,7 +4491,7 @@ namespace TriangleTests
// Ensure robustness with co-planar triangles by zeroing small distances.
uint32_t ADistIsZeroCR;
XMVECTOR ADistIsZero = XMVectorGreaterR(&ADistIsZeroCR, g_RayEpsilon, XMVectorAbs(BDist));
XMVECTOR ADistIsZero = XMVectorGreaterR(&ADistIsZeroCR, g_RayEpsilon, XMVectorAbs(ADist));
ADist = XMVectorSelect(ADist, Zero, ADistIsZero);
uint32_t ADistIsLessCR;