mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Refactoring points
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
8ca4cf3260
commit
b4cb314090
40 changed files with 746 additions and 783 deletions
|
@ -1,12 +1,19 @@
|
|||
import { cartesian2Polar } from "./angle";
|
||||
import type { GlobalPoint, LocalPoint, SymmetricArc } from "./types";
|
||||
import type {
|
||||
GlobalPoint,
|
||||
LocalPoint,
|
||||
SymmetricArc,
|
||||
ViewportPoint,
|
||||
} from "./types";
|
||||
import { PRECISION } from "./utils";
|
||||
|
||||
/**
|
||||
* Determines if a cartesian point lies on a symmetric arc, i.e. an arc which
|
||||
* is part of a circle contour centered on 0, 0.
|
||||
*/
|
||||
export const isPointOnSymmetricArc = <P extends GlobalPoint | LocalPoint>(
|
||||
export const isPointOnSymmetricArc = <
|
||||
P extends GlobalPoint | LocalPoint | ViewportPoint,
|
||||
>(
|
||||
{ radius: arcRadius, startAngle, endAngle }: SymmetricArc,
|
||||
point: P,
|
||||
): boolean => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue