Skip to content

Instantly share code, notes, and snippets.

@monkianer
Created February 20, 2018 09:25
Show Gist options
  • Save monkianer/3653c9c33754074d95ec8e828801ceea to your computer and use it in GitHub Desktop.
Save monkianer/3653c9c33754074d95ec8e828801ceea to your computer and use it in GitHub Desktop.
Degree Radians Conversion
// 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