515
SIN( ) Function
Sine Function
Format
SIN(num[,ERR=stmtref])
Where:
num
Value whose sine is to be returned. Numeric expression.
stmtref
Program line number or label to transfer control to.
Returns
Numeric, range -1 to 1.
Description
The SIN( ) function returns the sine of the numeric expression specified. It will return
a numeric value between -1 and 1, rounded to the current PRECISION in effect. Its
inverse function is ASN( ).
Example
00010
PRINT 'CS'
00020
X=0,Y=80
00030
LASTX=0,LASTY=80
00040
FOR I=-15 TO 1 STEP .5
00050
X=X+25
00060
Y=50*SIN(I)+80
00070
PRINT 'LINE'(LASTX,LASTY,X,Y)
00080
LASTX=X
00090
LASTY=Y
00100
NEXT