如题:
//角度转弧度
function degToRad(deg){
return Math.PI * 2 * (deg / 360)
}
//弧度转角度
function radToDeg(rad){
return rad * (360 / (Math.PI * 2))
}
//角度转弧度
function degToRad(deg){
return Math.PI * 2 * (deg / 360)
}
//弧度转角度
function radToDeg(rad){
return rad * (360 / (Math.PI * 2))
}
本文标题:js角度与弧度互换
本文链接:https://www.haomeiwen.com/subject/eztebltx.html
网友评论