shortestRotation

open fun shortestRotation(heading: Float, previousHeading: Float): Float

Util for finding the shortest path from the current rotated degree to the new degree.

Return

the shortest degree of rotation possible

Parameters

heading

the new position of the rotation

previousHeading

the current position of the rotation