概述
Math.sinh() 函数返回一个数字(单位为角度)的双曲正弦值.
语法
Math.sinh(x)
参数
-
x - 任意数字 (单位为度).
描述
双曲正弦的图像如下:

示例
Math.sinh(0) // 0
Math.sinh(1) // 1.1752011936438014
Math.sinh("-1") // -1.1752011936438014
Math.sinh("foo") // NaN
规范
| Specification | Status | Comment |
|---|---|---|
| ECMAScript 2015 (6th Edition, ECMA-262) Math.sinh |
Standard | Initial defintion |
Polyfill
该函数可以使用 Math.exp() 函数来实现:
function sinh(x){
return (Math.exp(x) - Math.exp(-x)) / 2);
}
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains.
Find out how you can help!
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 未实现 | 25 (25) | 未实现 | 未实现 | 未实现 |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | 未实现 | 未实现 | 25.0 (25) | 未实现 | 未实现 | 未实现 |