Crate oorandom

Source
Expand description

A tiny, robust PRNG implementation.

More specifically, it implements a single GOOD PRNG algorithm, which is currently a permuted congruential generator. It has two implementations, one that returns u32 and one that returns u64. It also has functions that return floats or integer ranges. And that’s it. What more do you need?

For more info on PCG generators, see http://www.pcg-random.org/

This was designed as a minimalist utility for video games. No promises are made about its quality, and if you use it for cryptography you will get what you deserve.

Works with #![no_std], has no global state, no dependencies apart from some in the unit tests, and is generally neato.

Structs§

  • A PRNG producing a 32-bit output.
  • A PRNG producing a 64-bit output.