refactor: point() -> pointFrom() to fix compiler issue (#8578)

This commit is contained in:
David Luzar 2024-10-01 21:27:17 +02:00 committed by Mark Tolmacs
parent 0c02972695
commit b4d8b04d9e
No known key found for this signature in database
50 changed files with 843 additions and 718 deletions

View file

@ -3,7 +3,7 @@ import { type GeometricShape } from "./geometry/shape";
import type { Curve, GenericPoint } from "../math";
import {
segment,
point,
pointFrom,
polygonIncludesPoint,
segmentIncludesPoint,
pointOnPolygon,
@ -95,7 +95,7 @@ const polyLineFromCurve = <Point extends GenericPoint>(
for (let i = 0; i < segments; i++) {
t += increment;
if (t <= 1) {
const nextPoint: Point = point(equation(t, 0), equation(t, 1));
const nextPoint: Point = pointFrom(equation(t, 0), equation(t, 1));
lineSegments.push(segment(startingPoint, nextPoint));
startingPoint = nextPoint;
}