Fix typing issue

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2024-10-02 12:18:34 +02:00
parent 336fa9d002
commit a50ac0ebff
No known key found for this signature in database

View file

@ -227,9 +227,7 @@ export const intersectRectanguloidWithLine = (
lineSegmentIntersectionPoints(line<GlobalPoint>(rotatedA, rotatedB), s),
)
.filter((x) => x != null)
.map((j: GlobalPoint) =>
pointRotateRads<GlobalPoint>(j, center, element.angle),
);
.map((j) => pointRotateRads<GlobalPoint>(j!, center, element.angle));
const cornerIntersections: GlobalPoint[] =
roundness > 0
? [
@ -337,9 +335,7 @@ export const intersectDiamondWithLine = (
)
.filter((x) => x != null)
// Rotate back intersection points
.map((p: GlobalPoint) =>
pointRotateRads<GlobalPoint>(p, center, element.angle),
);
.map((p) => pointRotateRads<GlobalPoint>(p!, center, element.angle));
const corners = arcs
.flatMap((x) => arcLineInterceptPoints(x, line(rotatedA, rotatedB)))
.filter((x) => x != null)