Function degreesSum

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(180, 90, true);

radiansSum is the same, but uses radians (0..2 Pi)

Orientation of angles is as follows:

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

    • start: number

      Starting angle, in degrees

    • amount: number

      Angle to add, in degrees

    • clockwise: boolean = true

      Add in clockwise direction (default: true)

    Returns number

    Sum result, in degrees