asin【アークサイン (逆正弦):arc-sine】
acos【アークコサイン (逆余弦):arc-cosine】
atan【アークタンジェント (逆正接):arc-tangent】
atan2【y/x のアークタンジェント (逆正接)】

メモ

  • 逆三角関数:アークサイン 【逆正弦】・アークコサイン 【逆余弦】・アークタンジェント 【逆正接】 ・y/x のアークタンジェント 【逆正接】
【未サポート】

【未サポート】

Math.asin【アークサイン (逆正弦):arc-sine】

メモ

概要

  • アークサイン (逆正弦)を取得

関連

外部リンク

構文

Math.asin( x ) 

アークサイン (ラジアン単位:-π/2 ~ +π/2)
    (引数が特殊な場合は下記参照)
x数値 (-1 ~ 1)
特殊仕様
x戻り値
数値以外数値に変換して処理
NaNNaN
1 <NaN
< (-1)NaN
+0+0
-0-0

グラフ表示

console.log(Math.asin(-1));
// 出力:-1.570796... (-π/2)
console.log(Math.asin(+1));
// 出力:1.570796... (+π/2)

console.log(Math.asin(NaN));
// 出力:NaN
console.log(Math.asin(2));
// 出力:NaN
console.log(Math.asin(-0));
// 出力:-0
console.log(Math.asin(+0));
// 出力:0

Math.acos【アークコサイン (逆余弦):arc-cosine】

メモ

概要

  • アークコサイン (逆余弦)を取得

関連

外部リンク

構文

Math.acos( x ) 

アークコサイン (ラジアン単位:+0 ~ +π)
    (引数が特殊な場合は下記参照)
x数値 (-1 ~ 1)
特殊仕様
x戻り値
数値以外数値に変換して処理
NaNNaN
1 < xNaN
x < (-1)NaN
1+0

グラフ表示

console.log(Math.acos(-1));
// 出力:3.141592... (π)
console.log(Math.acos(1));
// 出力:0

console.log(Math.acos(NaN));
// 出力:NaN
console.log(Math.acos(2));
// 出力:NaN

Math.atan【アークタンジェント (逆正接):arc-tangent】

メモ

概要

  • アークタンジェント (逆正接)を取得

関連

外部リンク

構文

Math.atan( x ) 

アークタンジェント(ラジアン単位:-π/2 ~ +π/2)
    (引数が特殊な場合は下記参照)
x数値
特殊仕様
x戻り値
数値以外数値に変換して処理
NaNNaN
+0+0
-0-0
+∞+π/2
-∞-π/2

グラフ表示

console.log(Math.atan(1));
// 出力:0.7853981633974483 (π/4)

console.log(Math.atan(NaN));
// 出力:NaN
console.log(Math.atan(-0));
// 出力:-0
console.log(Math.atan(+0));
// 出力:0
console.log(Math.atan(+Infinity));
// 出力:1.570796... (+π/2)
console.log(Math.atan(-Infinity));
// 出力:-1.570796... (-π/2)

Math.atan2【y/x のアークタンジェント (逆正接)】

メモ

概要

  • y/x のアークタンジェント (逆正接)を取得

関連

外部リンク

構文

Math.atan2( y, x ) 

x軸から座標 (y,x) までの逆時計回りの角度 (ラジアン単位)
    (引数が特殊な場合は下記参照)
yy座標
xx座標
特殊仕様
yx戻り値
数値以外数値以外数値に変換して処理
任意NaNNaN
NaN任意NaN
0 < y+0≒ +π/2
0 < y−0≒ +π/2
+00 < x+0
+0+0+0
+0−0≒ +π
+0x < 0≒ +π
−00 < x−0
−0+0−0
−0−0≒ −π
−0x < 0≒ −π
y < 0+0≒ −π/2
y < 0−0≒ −π/2
0 < (有限数)+∞+0
0 < (有限数)−∞≒ +π
< 0 (有限数)+∞−0
< 0 (有限数)−∞≒ −π
+∞有限数≒ +π/2
−∞有限数≒ −π/2
+∞+∞≒ +π/4
+∞−∞≒ +3π/4
−∞+∞≒ −π/4
−∞−∞≒ −3π/4

console.log(Math.atan2(1, 1));
// 出力:≒ +π/2

console.log(Math.atan2(1, NaN));
// 出力:NaN
console.log(Math.atan2(NaN, 1));
// 出力:NaN
console.log(Math.atan2(1, +0));
// 出力:≒ +π/2
console.log(Math.atan2(1, -0));
// 出力:≒ +π/2
console.log(Math.atan2(+0, 1));
// 出力:0
console.log(Math.atan2(+0, +0));
// 出力:0
console.log(Math.atan2(+0, -0));
// 出力:≒ +π
console.log(Math.atan2(+0, -1));
// 出力:≒ +π
console.log(Math.atan2(-0, 1));
// 出力:-0
console.log(Math.atan2(-0, +0));
// 出力:-0
console.log(Math.atan2(-0, -0));
// 出力:≒ -π
console.log(Math.atan2(-0, -1));
// 出力:≒ -π
console.log(Math.atan2(-1, +0));
// 出力:≒ −π/2
console.log(Math.atan2(-1, -0));
// 出力:≒ −π/2
console.log(Math.atan2(1, +Infinity));
// 出力:+0
console.log(Math.atan2(1, -Infinity));
// 出力:≒ +π
console.log(Math.atan2(-1, +Infinity));
// 出力:-0
console.log(Math.atan2(-1, -Infinity));
// 出力:≒ -π
console.log(Math.atan2(+Infinity, 1));
// 出力:≒ +π/2
console.log(Math.atan2(-Infinity, 1));
// 出力:≒ −π/2
console.log(Math.atan2(+Infinity, +Infinity));
// 出力:≒ +π/4
console.log(Math.atan2(+Infinity, -Infinity));
// 出力:+3π/4
console.log(Math.atan2(-Infinity, +Infinity));
// 出力:−π/4
console.log(Math.atan2(-Infinity, -Infinity));
// 出力:−3π/4