JavaScript Math.atan()
Esempio
let x = Math.atan(2);
Definizione e utilizzo
Il metodo Math.atan() restituisce l'arcotangente di un numero come valore compreso tra -PI/2 e PI/2 radianti.
Supporto browser
Math.atan()
è una funzione ECMAScript1 (ES1).
ES1 (JavaScript 1997) è completamente supportato in tutti i browser:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
Sintassi
Math.atan(x)
Parametri
Parameter | Description |
---|---|
x | Required. A number |
Valore di ritorno
Un numero da -PI/2 a PI/2. NaN se il valore è vuoto. |