let x = Math.acos(-1);
Try it Yourself »
let x = Math.acos(0);
Try it Yourself »
let x = Math.acos(1);
Try it Yourself »
The Math.acos()
method returns the arccosine (in radians) of a number.
The Math.acos()
method returns a value value between 0 and PI.
The Math.acos()
method expects a parameter in the range -1 to 1.
Math.acos(-1)
returns PI.
Math.acos(0)
returns PI/2.
Math.acos(1)
returns 0.
Math.acos(
x)
Parameter | Description |
x | Required. A number. |
Type | Description |
Number | 0 to PI.NaN if the parameter is outside the range of -1 to 1 or not numeric. |
Math.acos()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!