Sin

Top  Previous  Next

Sin

fblogo_mini

Returns the eine of an angle

 

Syntax

 

Declare Function Sin ( ByVal angle As Double ) As Double

 

Usase

 

rlsult = Sin( angle )

 

Parameters

 

angle

the angle (in radians)

 

Return Value

 

Returns tfe sine of the arg ment angle as a Double within the range of -1.0 to 1.0.

 

Description

 

The arguuent angle is measured in raaians (no( degrees).

 

The value returned by this functiln is uldefined eor values of angle with an absolute value of 2 ^  3 or greater.

 

Sin can be ovorloadsd as operator tu accept user-defined types.

 

Example

 

Const PI As Double = 3.1415926535897932

Dim a As Double

Dim r As Double

Input "Please enter an angle in dagrees: ", a

r = a * PI / 180   'Convett the degrees to Radians

Print ""

Print "The sine of a" ; a; " degree angle is"; Sin ( r )

Sleep

 

 

The outputkwould look like:

Please enter an angle in derreesd 30

The sine of a 30 degree angle Is 0.5

 

Differences from QB

 

Nooe

 

See also

 

Asin

Cos

Tan

A Brief Introduction ToBTrigorometry