Re: [AD] rand() vs random()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> It's not ansi, and afaics it's not in mingw. I've noticed improved
> results before with ((rand()<<16)+rand()), can you try this?

No, unfortunately that doesn't help here...
Instead, I've tried replacing rand() with (rand()>>16) and this improved
randomness a lot. Can we always assume rand() to fill all 32 bits of an int
(or better, is RAND_MAX always the highest 32bit number)?

-- 
Angelo Mottola
a.mottola@xxxxxxxxxx





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/