ProvideX V8.20 > Language Reference > 3. System Functions
404
COS( ) Function
        Return Cosine
Format
COS(num[,ERR=stmtref])
Where:
num
Numeric expression whose Cosine is to be returned.
stmtref
Program line number or label to transfer control to.
Returns
Value between -1 and +1.
Description
The COS( ) function returns the Cosine of the numeric expression. It returns a value
between -1 and +1, rounded to the current PRECISION in effect. ACS( ) is its inverse
function.
Examples
00010
PRINT 'CS'
00020
X=0,Y=80
00030
LASTX=0,LASTY=80
00040
FOR I=-20 TO 1 STEP .5
00050
X=X+25
00060
Y=50*COS(I)+80
00070
PRINT 'LINE'(LASTX,LASTY,X,Y)
00080
LASTX=X
00090
LASTY=Y
00100
NEXT