此方法返回弧度的反正切。atan方法返回一个在-pi/2和π/2弧度之间的数值。
语法
math.atan( x ) ;
下面是参数的详细信息:
返回值:
例子:
<html> <head> <title>javascript math atan() method</title> </head> <body> <script type="text/javascript"> var value = math.atan(-1); document.write("first test value : " + value ); var value = math.atan(.5); document.write("<br />second test value : " + value ); var value = math.atan(30); document.write("<br />third test value : " + value ); var value = math.atan("string"); document.write("<br />fourth test value : " + value ); </script> </body> </html>
这将产生以下结果:
first test value : -0.7853981633974483 second test value : 0.4636476090008061 third test value : 1.5374753309166493 fourth test value : nan
如对本文有疑问, 点击进行留言回复!!
selenium + ajax抓取英雄联盟全部英雄的详细信息及多线程保存全部皮肤图片到本地
网友评论