Skip to content

Instantly share code, notes, and snippets.

@Gerjo
Created October 7, 2013 17:00
Show Gist options
  • Save Gerjo/6871295 to your computer and use it in GitHub Desktop.
Save Gerjo/6871295 to your computer and use it in GitHub Desktop.
function DeltaRelativeRadians(a, b) {
var delta = b - a;
return delta + ((delta > Math.PI) ? -Math.TwoPI : (delta < -Math.PI) ? Math.TwoPI : 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment