Click or drag to resize

Sin Function

X#
Calculate the sine of a number.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION Sin(
	nNum AS USUAL
) AS FLOAT
Request Example View Source

Parameters

nNum
Type: Usual
An angle in radians.

Return Value

Type: Float
The sine of the specified angle.
Remarks
Examples
This example uses Sin() to calculate the sine of 2.7:
X#
1? Sin(2.7)                // 0.43
This example finds the sine 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:
X#
1? Sin(60/(180/PI))            // 0.87
See Also