PDA

View Full Version : Randomness?



Chambers
12-08-2006, 11:28 PM
What's the preferred method people use with ClanLib to get random numbers?

Otto (Strange) Halmén
12-09-2006, 10:49 AM
Try the class CL_NumberPool (http://www.clanlib.org/docs/clanlib-0.8.0/Reference/html/CL_NumberPool.html). I'm not sure if it's the "preferred method people use" because I haven't used it, but according to the reference manual it should do.

Chambers
12-14-2006, 10:31 PM
Hmm... interesting, but not quite a random number stream :)

Anyway, I'm working on implementing a PRNG class using the Mersenne Twist algorithm, since I can't find anything in ClanLib that actually provides unique random number streams.