7 lines
145 B
JavaScript
7 lines
145 B
JavaScript
function degrees_to_radians(degrees)
|
|
{
|
|
var pi = Math.PI;
|
|
return degrees * (pi/180);
|
|
}
|
|
|
|
console.log(degrees_to_radians(45)); |