Skip to content

Instantly share code, notes, and snippets.

@pete-murphy
Last active January 8, 2019 03:44
Show Gist options
  • Select an option

  • Save pete-murphy/e078dcc07085d5572c7f8834ff0d56cf to your computer and use it in GitHub Desktop.

Select an option

Save pete-murphy/e078dcc07085d5572c7f8834ff0d56cf to your computer and use it in GitHub Desktop.
Clock angles
const getAngleBetweenHands = (hour, min) =>
180 - Math.abs(Math.abs(((hour % 12) + min / 60) * 30 - min * 6) - 180)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment