fix: Sort was incorrectly called
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
9c04e22897
commit
5081abdde1
@ -8,6 +8,7 @@ import {
|
|||||||
isPointWithinBounds,
|
isPointWithinBounds,
|
||||||
lineSegment,
|
lineSegment,
|
||||||
lineSegmentIntersectionPoints,
|
lineSegmentIntersectionPoints,
|
||||||
|
pointDistanceSq,
|
||||||
pointFrom,
|
pointFrom,
|
||||||
pointFromVector,
|
pointFromVector,
|
||||||
pointRotateRads,
|
pointRotateRads,
|
||||||
@ -217,7 +218,7 @@ const intersectLinearOrFreeDrawWithLineSegment = (
|
|||||||
.map((l) => lineSegmentIntersectionPoints(l, segment))
|
.map((l) => lineSegmentIntersectionPoints(l, segment))
|
||||||
.filter((p): p is GlobalPoint => p != null),
|
.filter((p): p is GlobalPoint => p != null),
|
||||||
...curves.flatMap((c) => curveIntersectLineSegment(c, segment)),
|
...curves.flatMap((c) => curveIntersectLineSegment(c, segment)),
|
||||||
].sort();
|
].sort(pointDistanceSq);
|
||||||
};
|
};
|
||||||
|
|
||||||
const intersectRectanguloidWithLineSegment = (
|
const intersectRectanguloidWithLineSegment = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user