Skip to content

Commit

Permalink
refactor: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
zOadT committed Aug 3, 2023
1 parent 4c64f4d commit f0ac22c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/collision/Distance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ export const Distance = function (output: DistanceOutput, cache: SimplexCache, i
const saveB = []; // int[3]
let saveCount = 0;

let distanceSqr1 = Infinity;

// Main iteration loop.
let iter = 0;
while (iter < k_maxIters) {
Expand All @@ -130,16 +128,6 @@ export const Distance = function (output: DistanceOutput, cache: SimplexCache, i
break;
}

// Compute closest point.
const p = simplex.getClosestPoint();
const distanceSqr2 = p.lengthSquared();

// Ensure progress
if (distanceSqr2 >= distanceSqr1) {
// break;
}
distanceSqr1 = distanceSqr2;

// Get search direction.
const d = simplex.getSearchDirection();

Expand Down

0 comments on commit f0ac22c

Please sign in to comment.