Math.sinh()
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.
Die Math.sinh()
statische Methode gibt den hyperbolischen Sinus einer Zahl zurück. Das heißt,
Probieren Sie es aus
console.log(Math.sinh(0));
// Expected output: 0
console.log(Math.sinh(1));
// Expected output: 1.1752011936438014
console.log(Math.sinh(-1));
// Expected output: -1.1752011936438014
console.log(Math.sinh(2));
// Expected output: 3.626860407847019
Syntax
js
Math.sinh(x)
Parameter
x
-
Eine Zahl.
Rückgabewert
Der hyperbolische Sinus von x
.
Beschreibung
Da sinh()
eine statische Methode von Math
ist, verwenden Sie sie immer als Math.sinh()
und nicht als Methode eines von Ihnen erstellten Math
Objekts (Math
ist kein Konstruktorkonstruktor).
Beispiele
Verwendung von Math.sinh()
js
Math.sinh(-Infinity); // -Infinity
Math.sinh(-0); // -0
Math.sinh(0); // 0
Math.sinh(1); // 1.1752011936438014
Math.sinh(Infinity); // Infinity
Spezifikationen
Specification |
---|
ECMAScript® 2026 Language Specification # sec-math.sinh |