Sine and Cosine are rebelling!

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

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Could someone please tell me why the following code creates a square instead of a round ring?

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

This works with any variable, but once I have an Rnd as
the angle, as above, it goes square, and I can't figure out why.


[edit]

For example, this code works perfectly fine:

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