De JavaScript-functie Math.atanh () retourneert de hyperbolische arctangens van een getal.
atanh()
voert de omgekeerde bewerking van de Math.tanh
functie uit.
De syntaxis van de Math.atanh()
functie is:
Math.atanh(x)
atanh()
, zijnde een statische methode, wordt aangeroepen met behulp van de Math
klassenaam.
Math.atanh () Parameters
De Math.atanh()
functie neemt:
- x - Een nummer
Retourwaarde van Math.atanh ()
- Retourneert de hyperbolische arctangens van het opgegeven getal.
- Geeft
NaN
als resultaat als getal> 1 of getal <-1 .
Voorbeeld: Math.atanh () gebruiken
// Using Math.atanh() var num = Math.atanh(0); console.log(num); // 0 var num = Math.atanh(0.75); console.log(num); // 0.9729550745276566 var num = Math.atanh(1); console.log(num); // Infinity var num = Math.atanh(-1); console.log(num); // -Infinity var num = Math.atanh(2); console.log(num); // NaN var num = Math.atanh(-2); console.log(num); // NaN
Uitvoer
0 0,9729550745276566 Oneindig - Oneindig NaN NaN
Aanbevolen metingen:
- JavaScript-wiskunde tanh ()
- JavaScript-wiskunde asinh ()