You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initializing lowerIndex at 0 is unsafe and causes some Edge Case miscalculations and bizarre artifacts. The 2nd code snippet shows where lowerIndex(0) could equal (upperIndex+1)%poly.length if upperIndex is poly.length-1. Even when lowerIndex was never actually calculated.
This code is from polygonQuickDecomp
var upperInt = [0, 0], lowerInt = [0, 0], p = [0, 0]; // Points
var upperDist = 0, lowerDist = 0, d = 0, closestDist = 0; // scalars
var upperIndex = 0, lowerIndex = 0, closestIndex = 0;
if (lowerIndex === (upperIndex + 1) % polygon.length) {
The text was updated successfully, but these errors were encountered:
Initializing lowerIndex at 0 is unsafe and causes some Edge Case miscalculations and bizarre artifacts. The 2nd code snippet shows where lowerIndex(0) could equal (upperIndex+1)%poly.length if upperIndex is poly.length-1. Even when lowerIndex was never actually calculated.
This code is from polygonQuickDecomp
The text was updated successfully, but these errors were encountered: