User Tools

Site Tools


crpl:docs:shortestangle

<- CRPL reference <- Math Commands

ShortestAngle

<-curAngle <-newAngle ShortestAngle ->rotAngle

Description

Given two angles 1), 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
1)
in radians?
crpl/docs/shortestangle.txt · Last modified: 2022/07/04 08:51 by Karsten75