JavaScript Math.atanh () -funktionen returnerer den hyperbolske arktangens for et tal.
atanh()udfører den omvendte funktion af Math.tanhfunktionen.
Funktionens syntaks Math.atanh()er:
Math.atanh(x)
atanh(), der er en statisk metode, kaldes ved hjælp af Mathklassens navn.
Math.atanh () Parametre
Den Math.atanh()funktion tager i:
- x - Et tal
Returneringsværdi fra Math.atanh ()
- Returnerer den hyperbolske arktangens for det givne nummer.
- Returnerer
NaNhvis tal> 1 eller tal <-1 .
Eksempel: Brug af Math.atanh ()
// 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
Produktion
0 0,9729550745276566 Infinity-Infinity NaN NaN
Anbefalede målinger:
- JavaScript Math tanh ()
- JavaScript Math asinh ()








