JavaScript acos() method
- Vorherige Seite abs()
- Nächste Seite acosh()
- Zurück zur Oberfläche JavaScript Math Referenzhandbuch
Definition and usage
acos()
The method returns the inverse cosine of a number, with a value of 0 to PI radians.
Note:If the parameter x If the value is outside the range of -1 to 1, this method will return NaN.
Tip:If the parameter x If the value is -1, then PI will be returned.
Syntax
Math.acos(x)
Parameter value
Parameter | Description |
---|---|
x | Required. It must be a number between -1.0 and 1.0. |
Technical details
Return value: | Numerical values, from 0 to PI, if the value is outside the range of -1 to 1, it returns NaN. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser-Unterstützung
Math.acos()
Es ist eine ES1-Funktion (JavaScript 1999). Alle Browser unterstützen es vollständig:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Unterstützung | Unterstützung | Unterstützung | Unterstützung | Unterstützung | Unterstützung |
Verwandte Seiten
Tutorium:JavaScript-Mathematik
- Vorherige Seite abs()
- Nächste Seite acosh()
- Zurück zur Oberfläche JavaScript Math Referenzhandbuch