Cos Function | |
Calculate the cosine of a number.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION Cos(
nNum AS USUAL
) AS FLOAT
public static Float Cos(
Usual nNum
)
Request Example
View SourceParameters
- nNum
- Type: Usual
An angle in radians.
Return Value
Type:
Float
The cosine of the specified angle.
Remarks Examples
This example uses Cos() to calculate the cosine of 0 and PI:
This example finds the cosine of a 60-degree angle.
The first step is to convert 60 degrees to radians.
This is done by dividing the angle by 180/PI:
See Also