Skip to content

Instantly share code, notes, and snippets.

@mattlundstrom
Created November 27, 2013 20:00
Show Gist options
  • Select an option

  • Save mattlundstrom/7682276 to your computer and use it in GitHub Desktop.

Select an option

Save mattlundstrom/7682276 to your computer and use it in GitHub Desktop.
Shortest rotation distance
var rotationdifference:Number = Math.atan2(Math.sin(targetrotation-originalrotation),Math.cos(targetrotation-originalrotation));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment