Created
July 27, 2011 21:53
-
-
Save crash2burn/1110462 to your computer and use it in GitHub Desktop.
Shortest angl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def awesome(x,y) | |
x = x*(Math::PI/180) | |
y = y*(Math::PI/180) | |
(Math.atan2(Math.sin(x - y), Math.cos(x - y))/(Math::PI/180)).abs | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment