turborand
A fast random number generator.
turborand's internal implementation uses Wyrand, a simple and fast
generator but not cryptographically secure.
Examples
use *;
let rand = rng!;
if rand.bool else
Sample a value from a list:
use *;
let rand = rng!;
let values = ;
let value = rand.sample;
Generate a vector with random values:
use *;
use repeat_with;
let rand = rng!;
let values: = repeat_with.take.collect;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.