Sine and Cosine are rebelling!

BlitzMax Forums/BlitzMax Beginners Area/Sine and Cosine are rebelling!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

try

Graphics 320, 200
For Local a = 0 To 900
Local r:Float = Rnd(360)
Local x:Float = 20* Sin(r)
Local y:Float = 20* Cos(r)
Plot 160+x,100+y
Next
Flip
WaitKey

you need to make sure your cos'ing and sin'ing the same number

Edit Even:
Graphics 320, 200
For Local a = 0 To 900
Local r:Float = Rnd(360)
Local d:Float = Rnd(20)
Local x:Float = d* Sin(r)
Local y:Float = d* Cos(r)
Plot 160+x,100+y
Next
Flip
WaitKey