Skip to content

Instantly share code, notes, and snippets.

@mk-fg
Last active March 28, 2018 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mk-fg/fe5e34097189cbc74caf28399ca57df3 to your computer and use it in GitHub Desktop.
Save mk-fg/fe5e34097189cbc74caf28399ca57df3 to your computer and use it in GitHub Desktop.
result = sin(degrees*60) / 4096
the argument should be multiplied by 60
the result should be divided by 4096
this is because both the argument and results are integers
so
sin(90 * 60) will be 4096
cos(0 * 60) will be again 4096
and sin(45 * 60) / 4096.0 will be around 0.70710678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment