This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

acos

Summary

Returns the arc cosine (or inverse cosine) of a number.

Syntax

Math.acos( number )
number
Required. The required number argument is a numeric expression.

Return Value

The arc cosine of the number argument, in radians.

Examples

The following code shows how to use the acos function.

var v1 = Math.acos(-1.0);
 var v2 = Math.cos(-1.0);

 document.write(v1);
 document.write("<br/>");
 document.write(v2);

 // Output:
 // 3.141592653589793
 // 0.5403023058681398

Remarks

Applies To : Math Object

See also

Other articles

Attributions

  • Microsoft Developer Network: Article