Rand() is not Randomizing...

BlitzMax Forums/BlitzMax Beginners Area/Rand() is not Randomizing...

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.

> In what way is the blitz rand not good enough for 99.999% of users needs?

Well have a try yourself.

Do:

local moo = rand(0,1)


In my experience 0 is often chosen about 60-75% of the time instead of it being 50/50 with 1. Dunno why. Otherdays it's totally different.

But often you have to do extra stuff like this:-

local moo = rand(0,9)

Select moo 
Case 0,2,4,6,8
default
end select


or

local arse:float = rnd(0,1.9999999999)

moo = int(arse)


to make things a bit more random.