IncAngle
This function can be used to move an angle steadily towards a target angle at a specified rate, using the shortest distance. The return angle will stop changing when it reaches the target angle.
All angles are in degrees.
Syntax
Parameters
- target: the target value to move towards.
- current: the current value to start at.
- increments: units to move towards the target value.
Returns
Returns the incremented angle.