Fix curve test

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2025-08-11 15:44:04 +02:00
parent d238936413
commit ff57dfede5

View File

@@ -46,9 +46,11 @@ describe("Math curve", () => {
pointFrom(10, 50), pointFrom(10, 50),
pointFrom(50, 50), pointFrom(50, 50),
); );
const l = lineSegment(pointFrom(0, 112.5), pointFrom(90, 0)); const l = lineSegment(pointFrom(10, -60), pointFrom(10, 60));
expect(curveIntersectLineSegment(c, l)).toCloselyEqualPoints([[50, 50]]); expect(curveIntersectLineSegment(c, l)).toCloselyEqualPoints([
[9.99, 5.05],
]);
}); });
it("can be detected where the determinant is overly precise", () => { it("can be detected where the determinant is overly precise", () => {