BeSly Software Solutions About yab Demos About us Admin






Name:

sin() -- return the sine of its single argument

Synopsis:
y=sin(angle) 

Description:
The sin-function expects an angle (in radian, not degree) and returns its sine.

Example:
window open 200,200 to 400,400, "Example", "Example"
for phi=0 to 2*pi step 0.1 
	draw line 100+90*sin(phi-0.1),100+90*cos(phi-0.1) to 100+90*sin(phi),100+90*cos(phi), "Example"
next phi 
sleep 5
window close "Example"
Explanation:

  This program draws a circle (ignoring the existence of the circle-command).



Related: asin, cos