GLBasic User Manual

Main sections

COS()

a=COS(angle#)



Return the cosine of an angle# in DEG-mode (0-360°).

The result will be in the range -1 to +1.

Sample:
// Circle flight of an X
FOR alpha=0 TO 360
PRINT "X", 150*SIN(alpha) + 150, 150*COS(alpha) +150
SHOWSCREEN
NEXT

See also...