atan() 方法可返回数字的反正切值。
</>code
- Math.atan(x)
参数 | 描述 |
---|---|
x | 必需。必须是一个数值。 |
x 的反正切值。返回的值是 -PI/2 到 PI/2 之间的弧度值。
下面这个例子可通过 atan() 方法返回不同数字的反正切值:
</>code
- <script type="text/javascript">
- document.write(Math.atan(0.50) + "<br />")
- document.write(Math.atan(-0.50) + "<br />")
- document.write(Math.atan(5) + "<br />")
- document.write(Math.atan(10) + "<br />")
- document.write(Math.atan(-5) + "<br />")
- document.write(Math.atan(-10))
- </script>
输出:
</>code
- 0.4636476090008061
- -0.4636476090008061
- 1.373400766945016
- 1.4711276743037347
- -1.373400766945016
- -1.4711276743037347
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号