From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../reference/global_objects/math/sinh/index.html | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/math/sinh/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/math/sinh') diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/sinh/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/sinh/index.html new file mode 100644 index 0000000000..c9f0d376f9 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/math/sinh/index.html @@ -0,0 +1,123 @@ +--- +title: Math.sinh() +slug: Web/JavaScript/Reference/Global_Objects/Math/sinh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh +--- +
{{JSRef("Global_Objects", "Math")}}
+ +

概述

+ +

 Math.sinh() 函数返回一个数字(单位为角度)的双曲正弦值.

+ +

语法

+ +
Math.sinh(x)
+ +

参数

+ +
+
x
+
任意数字 (单位为度).
+
+ +

描述

+ +

双曲正弦的图像如下:

+ +

+ +

示例

+ +
Math.sinh(0)      // 0
+Math.sinh(1)      // 1.1752011936438014
+Math.sinh("-1")   // -1.1752011936438014
+Math.sinh("foo")  // NaN
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES6', '#sec-math.sinh', 'Math.sinh')}}{{Spec2('ES6')}}Initial defintion
+ +

Polyfill

+ +

该函数可以使用 {{jsxref("Math.exp()")}} 函数来实现:

+ +
function sinh(x){
+    return  (Math.exp(x) - Math.exp(-x)) / 2;
+}
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf