Public function

Get the angle of a point on an arc.

Signature
function angleDistance(
  fromAngle: number,
  toAngle: number,
  direction: number
): number
Parameters
NameDescription

fromAngle

number

The angle from center to arc's start point (A) on the circle

toAngle

number

The angle from center to arc's end point (B) on the circle

direction

number

The direction of the arc (1 = counter-clockwise, -1 = clockwise)

Returns
number

The distance in radians between the two angles according to the direction

Source

packages/editor/src/lib/primitives/utils.ts

approximately