7.5

Table Of Contents
Syntax
cos( value ) measure value
Argument
value
Measure value specifying the angle whose cosine is returned.
Code Sample Example
This example displays a sinusoidal graph.
Example
moveto(0,0)
define(&i,integer,0)
for(&i,1,10,360)
lineto(cos(inttofloat((&i)/ 4)),sin(inttofloat(&i)))
endfor()
closepath()
Sin (function)
Returns the sine value of the specified angle.
Syntax
sin( value ) measure value
Argument
value
Measure value specifying the angle whose sine is returned.
Code Sample Example
This example draws a somewhat sinusoidal graph.
Example
moveto(0,0)
define(&i,integer,0)
for(&i,1,10,360)
lineto(cos(inttofloat((&i)/ 4)),sin(inttofloat(&i)))
endfor()
closepath()
©2010 Objectif Lune Inc - 385 -