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.

      Note that clockwise direction yields a negative angle.

      // 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 2PI
      180 |
      3PI/2
      270deg

      Parameters

      • start: number

        Start angle, in radians

      • end: number

        End angle, in radians

      • direction: AngleDirection = ...

        Calculate in the specified direction (default: short)

      Returns number

      Angle of arc, in radians.