Skip to content

Commit fdd4a03

Browse files
committed
Revert "return first point as last point when pointset length < 4"
This reverts commit d464eaa. TurboWarp/scratch-vm#263
1 parent 752ac2e commit fdd4a03

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

dist/hull.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function hull(pointset, concavity, format) {
329329
maxEdgeLen = concavity || 20;
330330

331331
if (pointset.length < 4) {
332-
return pointset.concat([pointset[0]]);
332+
return pointset.slice();
333333
}
334334

335335
points = _filterDuplicates(_sortByX(formatUtil.toXy(pointset, format)));

src/hull.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function hull(pointset, concavity, format) {
172172
maxEdgeLen = concavity || 20;
173173

174174
if (pointset.length < 4) {
175-
return pointset.concat([pointset[0]]);
175+
return pointset.slice();
176176
}
177177

178178
points = _filterDuplicates(_sortByX(formatUtil.toXy(pointset, format)));

test/hull.js

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)