ixfx
    Preparing search index...

    Function radiansSum

    • Sum angles together, accounting for the 'wrap around'.

      clockwise of true (default) means angles are added in clockwise direction

      // From 180deg, add 90deg in the clockwise direction
      radiansSum(Math.PI, Math.PI/2, true);

      Orientation of angles is as follows:

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

      degreesSum is the same, but uses degrees (0..360)

      Parameters

      • start: number

        Starting angle, in radian

      • amount: number

        Angle to add, in radian

      • clockwise: boolean = true

        Add in clockwise direction (default: true)

      Returns number

      Sum result, in radians