ixfx
    Preparing search index...

    Function radianArc

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

      // Between 0-90deg in clockwise direction
      radianArc(0, Math.PI/2, true); // Yields: 3Pi/2 (270 deg)

      // In counter-clockwise direction
      radianArc(0, Math.PI/2, false); // Yields: Math.PI/2 (90deg)

      See degreeArc to operate in degrees.

      Orientation of angles is as follows:

            90deg
      Pi/2
      |
      Pi ---+--- 0
      180 |
      3PI/2
      270deg

      Parameters

      • start: number

        Start angle, in radians

      • end: number

        End angle, in radians

      • clockwise: boolean = true

        Calculate in clockwise direction (default: true)

      Returns number

      Angle of arc, in radians.