mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
ellipse and arc refactors
This commit is contained in:
parent
3efa8735ef
commit
392dd5b0b8
9 changed files with 125 additions and 94 deletions
|
@ -6,7 +6,7 @@ describe("point on arc", () => {
|
|||
it("should detect point on simple arc", () => {
|
||||
expect(
|
||||
isPointOnSymmetricArc(
|
||||
arc(1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
point(0.92291667, 0.385),
|
||||
),
|
||||
).toBe(true);
|
||||
|
@ -14,7 +14,7 @@ describe("point on arc", () => {
|
|||
it("should not detect point outside of a simple arc", () => {
|
||||
expect(
|
||||
isPointOnSymmetricArc(
|
||||
arc(1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
point(-0.92291667, 0.385),
|
||||
),
|
||||
).toBe(false);
|
||||
|
@ -22,7 +22,7 @@ describe("point on arc", () => {
|
|||
it("should not detect point with good angle but incorrect radius", () => {
|
||||
expect(
|
||||
isPointOnSymmetricArc(
|
||||
arc(1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
point(-0.5, 0.5),
|
||||
),
|
||||
).toBe(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue