User Tools

Site Tools


crpl:docs:shortestangle

This is an old revision of the document!


<- CRPL reference <- Math Commands

ShortestAngle

ArgumentsResultNotation
Two angles in radiansThe shortest angle between the two specified angles f1 f2 – f3

Description

Given two angles, calculates the shortest angle between the two. Useful for determining which direction a unit should rotate in order to turn to a given direction. A positive or negative value will be returned in the range of PI to -PI. Negative values indicate clockwise rotation.

Examples

1.1 2.5 ShortestAngle trace
crpl/docs/shortestangle.1612543437.txt.gz · Last modified: 2025/02/14 14:56 (external edit)