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.

cos

Summary

Returns the cosine of a number.

Syntax

Math.cos( radians )

Examples

var v1 = Math.cos(-1.0);
document.write(v1);
// Output: 0.5403023058681398

Remarks

The required radians argument is a numeric expression that contains an angle measured in radians.

The return value is the cosine of the numeric argument of radians.

Applies To : Math Object

See also

Other articles

Attributions

  • Microsoft Developer Network: Article