20 releases (8 stable)

4.0.0-alpha.3 Aug 26, 2020
3.0.1 Oct 4, 2019
3.0.0 Aug 30, 2019
3.0.0-rc.3 Jul 16, 2019
0.890.0 May 14, 2018

#12 in #prng

Download history 109/week @ 2021-08-11 86/week @ 2021-08-18 136/week @ 2021-08-25 355/week @ 2021-09-01 96/week @ 2021-09-08 71/week @ 2021-09-15 46/week @ 2021-09-22 82/week @ 2021-09-29 168/week @ 2021-10-06 119/week @ 2021-10-13 110/week @ 2021-10-20 327/week @ 2021-10-27 344/week @ 2021-11-03 369/week @ 2021-11-10 322/week @ 2021-11-17 430/week @ 2021-11-24

1,509 downloads per month
Used in 9 crates (8 directly)

Zlib OR Apache-2.0 OR MIT

24KB
515 lines

License:Zlib MinRust:1.46 Unsafe:None crates.io docs.rs

randomize

Simple and minimalist randomization library.

NOT FOR CRYPTOGRAPHIC PURPOSES.


lib.rs:

Simple and minimalist randomization library.

NOT FOR CRYPTOGRAPHIC PURPOSES.

Usage

You should make a [PCG32] value, and then generally you'll call methods from the [Gen32] trait:

use randomize::{Gen32, PCG32};
let mut g = PCG32::seed(5, 6);
println!("rolling 1d6: {}", g.dice(1, 6));

Cargo Features

  • getrandom: adds the from_getrandom method to the [PCG32] type, which makes a new generator from OS randomness. This depends on the getrandom crate.

Dependencies

~215KB

:F_