Re: [AD] rand() vs random() |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Angelo Mottola wrote:
is the random number generator properly seeded with srand() where rand() gives you poor random numbers? calling it on on the system driver's init method or allegro_install() should suffice, but grepping through allegro's sources i only find one occurrence of rand() and that's in colblend.c, no occurrence of srand() though. i beleive i have just found a bug.Can we use random() instead of rand() in the test program? Under OSX using rand() gives really poor randomness in tests, and it's not nice to see. random() on the other hand performs much better. Since it should be supported by all the platforms Allegro runs on (can you confirm this? It's an stdlib function), can we replace rand() with it at least in test.c?
Sincererly Henrik Stokseth.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |