Start of main content
Degrees to radians
Math.PI constant can be used to convert an angle from degrees to radians. The conversion formula is
radians = degrees * Math.PI / 180.0.
const degreesToRads = deg => (deg * Math.PI) / 180.0;
Radians to degrees
Conversely, the conversion formula from radians to degrees is
degrees = radians * 180.0 / Math.PI.
const radsToDegrees = rad => (rad * 180.0) / Math.PI;
radsToDegrees(Math.PI / 2);
More like this
Collection · 4 snippets
Converts an integer to its roman numeral representation.
Accepts value between
3999 (both inclusive).