User Tools

Site Tools


crpl:docs:shortestangle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
crpl:docs:shortestangle [2013/01/14 19:04] – created virgilwcrpl:docs:shortestangle [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-TODO+ 
 +<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#math_commands|Math Commands]] 
 +=====  ShortestAngle  ===== 
 + 
 +<-curAngle <-newAngle ShortestAngle ->rotAngle 
 + 
 +=== Description === 
 +Given two angles ((in radians?)), 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 === 
 +<code 4RPL>1.1 2.5 ShortestAngle trace</code> 
crpl/docs/shortestangle.1358190259.txt.gz · Last modified: 2025/02/14 14:56 (external edit)