Cos Method

Math.Cos Method (Double)

 

Returns the cosine of the specified angle.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

static member Cos : 
        d:float -> float

Parameters

d
Type: System.Double

An angle, measured in radians.

Return Value

Type: System.Double

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

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 Cos method returns d unchanged rather than throwing an exception.

The following example uses Cos to evaluate certain trigonometric identities for selected angles.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft