サイト内検索

Math メソッド一覧

スポンサー

ホーム > Math > atan

atan

アークタンジェントを返します.

シンタックス

Math.atan(x)
  • x - 数値

解説

atanメソッドはxのアークタンジェントを-PI/2からPI/2までの範囲で返します.(ラジアン単位)

サンプルコード

以下にatanメソッドを使用したサンプルコードを示します.

<html>
  <head>
    <title>atanメソッドのサンプルコード</title>
  </head>
  <body>
    <script type="text/javascript" language="javascript">
      document.write(Math.atan(-2) + "<br />");
      document.write(Math.atan(-1) + "<br />");
      document.write(Math.atan(0) + "<br />");
      document.write(Math.atan(1) + "<br />");
      document.write(Math.atan(2));
    </script>
  </body>
</html>

実行例

サンプルコードの実行結果は以下のようになります.

-1.1071487177940904
-0.7853981633974483
0
0.7853981633974483
1.1071487177940904 

関連項目

スポンサード リンク

inserted by FC2 system