Sine/Cosine

BlitzPlus Forums/BlitzPlus Beginners Area/Sine/Cosine

Here's something to paste and run.
Graphics 800,600
 SetBuffer BackBuffer()
x#=GraphicsWidth()/2
y#=GraphicsHeight()/2

While Not KeyDown(1)
	Cls
	Line x-100,y,x+100,y
	Line x,y-100,x,y+100
	Line x,y,MouseX(),MouseY()
	a#=ATan2(MouseY()-y,MouseX()-x)
	Text 100,100,"angle= "+a
	Text x-100,y,"-100",1
	Text x+100,y,"+100",1
	Text x,y-100-FontHeight(),"-100",1
	Text x,y+100,"+100",1
	Flip
Wend