Math.cosh()
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.
Math.cosh()
函数返回数值的双曲余弦函数,可用 constant e 表示:
语法
Math.cosh(x)
参数
x
-
数值。
描述
由于 cosh()
是 Math 的静态函数,只需通过 Math.cosh()
调用,而不用通过创建 Math 对象来调用。
示例
使用 Math.cosh()
js
Math.cosh(0); // 1
Math.cosh(1); // 1.5430806348152437
Math.cosh(-1); // 1.5430806348152437
规范
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.cosh |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cosh |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.