JavaScript中的Math.sin()函数
sin()Math对象的功能接受一个角度(以弧度为单位)并返回其正弦值。
语法
它的语法如下
Math.sin(90)
示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.sin(90);
document.write("sine value of the given angle: "+result);
</script>
</body>
</html>输出结果
sine value of the given angle: 0.8939966636005579