Re: [AD] srand()

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


Hein Zelle wrote:

Peter Wang wrote:

I still think Allegro should have its own portable allegro_seed() and
allegro_random() functions...
I don't.

Why? (question for both Peter and original author)

Is rand() combined with srand() so unportable that allegro needs it's
own version?

Well, DJGPP's rand() is not so good, but it's random() is better. Why? I have no idea. It seem logical for me to have one call the other. Mingw tries to duplicate MSVC's behavior, and that is to provide a rand() which returns only 15-bit results. This borders on uselessness.

Finally, there's some public domain code for Mersenne Twisters floating around. Maybe that can be included in Allegro?




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