JavaScript acos () method
Definition and Usage
acos () method returns the inverse cosine of a number. The returned value is in radians between 0 and PI.
Note: If the parameter x exceeds the range of -1.0 to 1.0, the browser will return NaN.
Tip: If the value of the parameter x -1 is returned PI.
Browser Support
All major browsers support acos () method
grammar
Math.acos( x )
Parameter Value
参数 | 描述 |
---|---|
x | 必需。必须是 -1.0 ~ 1.0 之间的数。 |
return value
类型 | 描述 |
---|---|
Number | x 的反余弦值。返回的值是 0 到 PI 之间的弧度值。 |
technical details
JavaScript version: | 1.0 |
---|