AS3 Find the shortest rotation angle between two angles


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var diffAngle:Number = Math.atan2(Math.sin(angleTo - currentAngle), Math.cos(angleTo - currentAngle));

URL: http://blog.open-design.be/2009/06/02/find-the-shortest-rotation-angle-between-two-angles/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.