Add ellipse changes no angle

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2024-09-27 11:34:02 +02:00
parent d9ea7190ec
commit 7b4e989d65
No known key found for this signature in database
12 changed files with 97 additions and 357 deletions

View file

@ -1,5 +1,5 @@
import { radians } from "./angle";
import { arc, arcIncludesPoint, arcSegmentInterceptPoint } from "./arc";
import { arc, arcIncludesPoint, arcSegmentInterceptPoints } from "./arc";
import { point } from "./point";
import { segment } from "./segment";
@ -33,7 +33,7 @@ describe("point on arc", () => {
describe("intersection", () => {
it("should report correct interception point", () => {
expect(
arcSegmentInterceptPoint(
arcSegmentInterceptPoints(
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
segment(point(2, 1), point(0, 0)),
),
@ -42,7 +42,7 @@ describe("intersection", () => {
it("should report both interception points when present", () => {
expect(
arcSegmentInterceptPoint(
arcSegmentInterceptPoints(
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
segment(point(0.9, -2), point(0.9, 2)),
),