Re: [AD] rand() vs random() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Peter Wang wrote:
> I'm still against making it public, for more or less the same reasons I
> gave in September last year. (Plus another: it should be a crime to
> knowingly distribute bad RNGs for general use.)
I'm not sure I remember your reasons from last september, but I agree
that distributing a bad RNG with allegro is not good, if it's
public. I prefer using alrand for the public part: it can be made
portable and using good algorithms. I guess that leaves the options to
include alrand in allegro and make it public, or to include a simple
random generator not visible to the public. I think I prefer the first.
> > First, I think as long as allegro only calls rand() and not srand(),
> > users output shouldn't be affected: as long as you consistently call
> > the blender functions the same amount of times, your random series
> > should be reproducable.
>
> But it's unexpected and very fragile.
It's certainly unexecpected, but I can't think of any cases where it
would break. I agree it's not very pretty, though. If it stays in it
should probably be documented.
Hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
Unix is user friendly. It's just very particular about who
it's friends are.
Hein Zelle hein@xxxxxxxxxx
http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<