JavaScript acos() method
- Föregående sida abs()
- Nästa sida acosh()
- Åter till föregående nivå JavaScript Math ReferensManual
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: | Numbers, from 0 to PI, if the value is outside the range of -1 to 1, it returns NaN. |
---|---|
JavaScript version: | ECMAScript 1 |
Webbläsarstöd
Math.acos()
Är ES1-funktioner (JavaScript 1999). Alla webbläsare stöder det fullt ut:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Stöd | Stöd | Stöd | Stöd | Stöd | Stöd |
Relaterade sidor
Lärobok:JavaScript matematik
- Föregående sida abs()
- Nästa sida acosh()
- Åter till föregående nivå JavaScript Math ReferensManual