Skip to content

Instantly share code, notes, and snippets.

@moondef
Last active June 22, 2018 13:06
Show Gist options
  • Save moondef/fb2a024f8951d686e78ad75661067547 to your computer and use it in GitHub Desktop.
Save moondef/fb2a024f8951d686e78ad75661067547 to your computer and use it in GitHub Desktop.
Get angle between arrows
const getAngle = (hour, min) => Math.abs(30 * ((hour % 12) + min / 60) - min * 6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment