Created
March 23, 2018 23:12
-
-
Save andylshort/91fafc51a8474c6a427903986599ab66 to your computer and use it in GitHub Desktop.
JavaScript Math lib
This file contains hidden or 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
// Converts from degrees to radians. | |
Math.radians = function(degrees) { | |
return degrees * Math.PI / 180; | |
}; | |
// Converts from radians to degrees. | |
Math.degrees = function(radians) { | |
return radians * 180 / Math.PI; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment