@mocanvas/editor · function
declare function getPointInArcT(mAB: number, A: number, B: number, P: number): numberWhere the angle P falls along the arc from A to B, as a t in [0, 1]
for a point on the arc and outside it for a point that is not.
SEMANTICS-ASSUMED: the docs pin 0 at the start and 1 at the end but say
nothing about points off the arc. Letting t run on past 1 (rather than
clamping) keeps it monotonic all the way round, which is what a caller
projecting a pointer onto an arc needs in order to tell which end it is past.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.