该例子取得不同数的反正切值:
<script language="JavaScript"> document.write( Math.atan(0.35) + "<br />" ); document.write( Math.atan(10) + "<br />" ); document.write( Math.atan(-10) + "<br />" ); document.write( Math.atan(0) ); </script>
运行该例子,输出:
0.33667481938672716 1.4711276743037347 -1.4711276743037347 0