JavaScript中的Math.cos()函数
cos()Math对象的功能接受一个角度(以弧度为单位)并返回其余弦值。
语法
它的语法如下
Math.cos(90)
示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.cos(90);
document.write("cosine value of the given angle: "+result);
</script>
</body>
</html>输出结果
cosine value of the given angle: -0.4480736161291702
热门推荐
10 官宣新年祝福语简短
11 群里祝福语简短幽默
12 许嵩生日祝福语简短
13 对生活祝福语简短精辟
14 长辈钻石婚祝福语简短
15 小红书平安祝福语简短
16 幼师春节祝福语简短创意
17 分手祝福语简短短句
18 捐款人留言祝福语简短