Math.asinh()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Phương thức tĩnh Math.asinh() trả về arcsin hyperbolic của một số. Cụ thể:
Try it
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
Cú pháp
js
Math.asinh(x)
Tham số
x-
Một số.
Giá trị trả về
Arcsin hyperbolic của x.
Mô tả
Vì asinh() là một phương thức tĩnh của Math, bạn luôn sử dụng nó dưới dạng Math.asinh(), thay vì là phương thức của một đối tượng Math bạn tạo ra (Math không phải là constructor).
Ví dụ
>Sử dụng 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
Đặc tả kỹ thuật
| Thông số kỹ thuật |
|---|
| ECMAScript® 2027 Language Specification> # sec-math.asinh> |