gregtour/duck-lang — pull request #10 by rpcope1 (2014-11-20 08:05:59+00:00)
Title: Added Prototype Random Numbers Library

So, this is the prototype random numbers library I've written. Rather than totally rely on the often questionable C rand() built-in, the random number generation is built on [XORShift128+](http://xorshift.di.unimi.it/), which should provide a excellent quality but fast random number implementation, probably plenty good and fast enough if you're using this to write games (or otherwise). The library implementation is _slightly_ more involved than the math library, hopefully this still looks pretty good. You can play with it via the new example bin/examples/random.txt.

The only thing that's a little sketchy here is some of the ugliness needed to move from fixed width (I'm hesitant to change the actual PRNG implementation away from fixed width) to non-fixed width types (int, long, etc.); still I tested this on both a 32-bit and 64-bit system, and it looks like it works OK on both. Any feedback is highly appreciated, and thanks again for letting me contribute.

Best Regards,
Robert