Share via


Cos Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the cosine of the specified angle.

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

Syntax

'Declaration
Public Shared Function Cos ( _
    a As Double _
) As Double
public static double Cos(
    double a
)
public:
static double Cos(
    double a
)
static member Cos : 
        a:float -> float 
public static function Cos(
    a : double
) : double

Parameters

Return Value

Type: System. . :: . .Double
The cosine of a. If a is equal to NaN, NegativeInfinity, or PositiveInfinity, this method returns NaN.

Remarks

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

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

.NET Framework Security

See Also

Reference

Math Class

System Namespace