Function degreeArc

Computes the angle arc between a start and end angle, given in degrees. It properly accounts for the wrap-around values.

// Between 0-90 in clockwise direction
degreeArc(0, 90, true); // Yields: 270

// In counter-clockwise direction
degreeArc(0, 90, false); // Yields: 90

See radianArc to operate in radians.

Orientation of angles is as follows:

      90
|
180 ---+--- 0
|
270
  • Parameters

    • start: number

      Start angle, in degrees

    • end: number

      End angle, in degrees

    • clockwise: boolean = true

      Calculate in clockwise direction (default: true)

    Returns number

    Angle of arc, in degrees.