Javascript Math Degree Convert to Radian

Description

Javascript Math Degree Convert to Radian


// Convert degrees to radians
Math.degToRad = function(degrees) {
    return degrees*(Math.PI/180);
}

console.log(Math.degToRad(180));/*from  ww  w.j  a  v  a2 s . c  o m*/



PreviousNext

Related