差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| articles:atan2 [2021/06/22 15:17] – Takashi Suehiro | articles:atan2 [2024/09/03 12:38] (現在) – Takashi Suehiro | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== atan2 ====== | ====== atan2 ====== | ||
| - | 一般に正接関数($x=\mathrm{tan}(\theta$)の逆関数($\theta=\mathrm{tan}^{-1}(x)$)は値域を$(-\pi/ | + | 一般に正接関数($x=\mathrm{tan}\,\theta$)の逆関数($\theta=\mathrm{tan}^{-1}x$)は値域を$(-\pi/ |
| [{{ articles: | [{{ articles: | ||
| 行 18: | 行 18: | ||
| これを可能にするのが$\mathrm{atan2}$関数であり,多くのプログラミング言語のライブラリに組み込まれている. | これを可能にするのが$\mathrm{atan2}$関数であり,多くのプログラミング言語のライブラリに組み込まれている. | ||
| - | その定義は各象限と&\pi/ | + | その定義は各象限,$\pi/2$,$-\pi/ |
| $$ | $$ | ||
| \theta = | \theta = | ||
| - | \mathrm{atan2}(x,y) | + | \mathrm{atan2}(y,x) |
| = \left\{ \begin{array}{cc} | = \left\{ \begin{array}{cc} | ||
| \mathrm{tan}^{-1}(y/ | \mathrm{tan}^{-1}(y/ | ||