每天CookBook之JavaScript-017

  • Math.PI的使用
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>017</title>
</head>
<body>
    
</body>
<script type="text/javascript">
var radians = degress * (Math.PI / 180);
var degress = radians * (180 / Math.PI);
console.log(radians);
console.log(degress);
</script>
</html>
posted @ 2016-07-09 11:12  4Thing  阅读(64)  评论(0编辑  收藏  举报