System.Math.Cos Method

Returns the cosine of the specified angle.

Syntax

public static double Cos (double d)

Parameters

d
An angle, measured in radians.

Returns

The cosine of d. If d is equal to double.NaN, double.NegativeInfinity, or double.PositiveInfinity, this method returns double.NaN.

Remarks

The angle, d, must be in radians. Multiply by Math.PI/180 to convert degrees to radians.

Acceptable values of d range from approximately -9223372036854775295 to approximately 9223372036854775295. For values outside this range, the Math.Cos(double) method returns d unchanged rather than throwing an exception.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0