Skip to content

Commit

Permalink
更新部分算法提升精度。
Browse files Browse the repository at this point in the history
  • Loading branch information
Woody committed Mar 1, 2023
1 parent c2a24b3 commit 3729a55
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,9 @@ private static bool TryTetrahedronTriangle(ref Vector3 A, ref Vector3 B, ref Vec
simplex.SimplexB.B = B2;
simplex.SimplexB.C = C2;
simplex.State = SimplexState.Triangle;
Fix64 denom = F64.C1 / (va + vb + vc);
simplex.W = vc * denom;
simplex.V = vb * denom;
Fix64 denom = (va + vb + vc);
simplex.W = vc / denom;
simplex.V = vb / denom;
simplex.U = F64.C1 - simplex.V - simplex.W;
Vector3.Multiply(ref ab, simplex.V, out point);
Vector3 acw;
Expand Down

0 comments on commit 3729a55

Please sign in to comment.