That’s it, the following code finds for you the shortest rotation angle from a given angle to another: [sourcecode language=’as3′] var diffAngle:Number = Math.atan2(Math.sin(angleTo – currentAngle), Math.cos(angleTo – currentAngle)); [/sourcecode] The code was given on this forum. You’ll also find a way to do it with vectors.

tototototototot

# All posts tagged angle

## Useful links: Angles, directions, rotations, …

Angles and Directions: http://wiki.tcl.tk/10814

## Recent Comments