mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
More refactor
This commit is contained in:
parent
392dd5b0b8
commit
b697f63cad
18 changed files with 206 additions and 199 deletions
|
@ -1,11 +1,11 @@
|
|||
import { radians } from "./angle";
|
||||
import { arc, isPointOnSymmetricArc } from "./arc";
|
||||
import { arc, arcIncludesPoint } from "./arc";
|
||||
import { point } from "./point";
|
||||
|
||||
describe("point on arc", () => {
|
||||
it("should detect point on simple arc", () => {
|
||||
expect(
|
||||
isPointOnSymmetricArc(
|
||||
arcIncludesPoint(
|
||||
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
point(0.92291667, 0.385),
|
||||
),
|
||||
|
@ -13,7 +13,7 @@ describe("point on arc", () => {
|
|||
});
|
||||
it("should not detect point outside of a simple arc", () => {
|
||||
expect(
|
||||
isPointOnSymmetricArc(
|
||||
arcIncludesPoint(
|
||||
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
point(-0.92291667, 0.385),
|
||||
),
|
||||
|
@ -21,7 +21,7 @@ describe("point on arc", () => {
|
|||
});
|
||||
it("should not detect point with good angle but incorrect radius", () => {
|
||||
expect(
|
||||
isPointOnSymmetricArc(
|
||||
arcIncludesPoint(
|
||||
arc(point(0, 0), 1, radians(-Math.PI / 4), radians(Math.PI / 4)),
|
||||
point(-0.5, 0.5),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue