Math.asinh()
Math.asinh() 靜態方法返回數字的逆雙曲正弦。即,
試一試
console.log(Math.asinh(1));
// Expected output: 0.881373587019543
console.log(Math.asinh(0));
// Expected output: 0
console.log(Math.asinh(-1));
// Expected output: -0.881373587019543
console.log(Math.asinh(2));
// Expected output: 1.4436354751788103
語法
js
Math.asinh(x)
引數
x-
一個數字。
返回值
x 的逆雙曲正弦。
描述
因為 asinh() 是 Math 的靜態方法,所以您始終將其用作 Math.asinh(),而不是用作您建立的 Math 物件的(Math 不是建構函式)。
示例
使用 Math.asinh()
js
Math.asinh(-Infinity); // -Infinity
Math.asinh(-1); // -0.881373587019543
Math.asinh(-0); // -0
Math.asinh(0); // 0
Math.asinh(1); // 0.881373587019543
Math.asinh(Infinity); // Infinity
規範
| 規範 |
|---|
| ECMAScript® 2026 語言規範 # sec-math.asinh |
瀏覽器相容性
載入中…