fix: Use analytical Jacobian for curve intersection testing (#10007)

This commit is contained in:
Márk Tolmács
2025-09-24 19:33:20 +02:00
committed by GitHub
parent 06c40006db
commit e32836f799
3 changed files with 101 additions and 82 deletions

View File

@@ -46,9 +46,11 @@ describe("Math curve", () => {
pointFrom(10, 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", () => {