fix: issue with feature vertex being out of bound

This commit is contained in:
Azgaar 2024-09-25 17:05:31 +02:00
parent 949a486bf8
commit 84c326e347
4 changed files with 7 additions and 7 deletions

View file

@ -42,8 +42,9 @@
const newPoints = [prevPoint];
let point;
for (let i = 1, len = points.length; i < len; i++) {
for (let i = 1; i < points.length; i++) {
point = points[i];
if (!point) continue;
if (getSqDist(point, prevPoint) > sqTolerance) {
newPoints.push(point);
@ -51,8 +52,7 @@
}
}
if (point && prevPoint !== point) newPoints.push(point);
if (prevPoint !== point) newPoints.push(point);
return newPoints;
}