Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
Math.atan() は静的メソッドで、数値の逆正接(アークタンジェント)をラジアン単位で返します。
𝙼𝚊𝚝𝚑.𝚊𝚝𝚊𝚗(𝚡)=arctan(x)=the unique y∊[−π2,π2] such that tan(y)=x\mathtt{\operatorname{Math.atan}(x)} = \arctan(x) = \text{the unique } y \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right] \text{ such that } \tan(y) = x数値です。
(-π2-\frac{\pi}{2} ~ π2\frac{\pi}{2} で両端を含むラジアン単位の角度である) x の逆正接(アークタンジェント)です。 x が Infinity である場合は π2\frac{\pi}{2} を返します。 x gが -Infinity である場合、 -π2-\frac{\pi}{2} を返します。
atan() は Math の静的メソッドであるため、生成した Math オブジェクトのメソッドとしてではなく、常に Math.atan() として使用するようにしてください (Math はコンストラクターではありません)。
シータ関数を避け、代わりに Math.atan2() を使用することをお勧めします。これは、より広い範囲(-π から π まで)を保有しており、x が 0 の場合など、 NaN を出力しないようにします。
| ECMAScript® 2027 Language Specification # sec-math.atan |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年10月2日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.