Re: [PATCH] small glib fix.



On Wednesday, May 30, 2001 at 13:27, Darin Adler wrote:
> On Wednesday, May 30, 2001, at 02:21  PM, Anders Carlsson wrote:
> 
> > Really? I just based it on the g_rand_boolean macro:
> >
> > #define g_rand_boolean(rand) (g_rand_int ((rand)) & (1<<15))
> >
> > Is that wrong too?
> 
> I think so.

Wouldn't the right fix be to add a function that can generate
a random number of N bits? (in java.util.Random,
nextBoolean is defined as "next(1) != 0"). (It would be cool
too if the GTK random number generator was compatible with
the Java one :)

Oskar Liljeblad (osk hem passagen se)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]