2 releases
0.1.1 | Aug 17, 2024 |
---|---|
0.1.0 | Mar 12, 2023 |
#746 in Algorithms
37 downloads per month
19KB
228 lines
No-frills PCG32 random number generator implementation
It implements the PCG32 random number generator (and really only that).
let mut g = pcg32::Pcg32::new(0xff30_6525_39eb_eaa9, 0x315b_fae4_8ade_2146);
assert_eq!(g.generate(), 0xf986_95e1);
assert_eq!(g.generate(), 0x7e39_20e2);
This crate is no_std
compatible.
lib.rs
:
No-frills PCG32 random number generator implementation
It implements the PCG32 random number generator (and really only that).
let mut g = pcg32::Pcg32::new(0xff30_6525_39eb_eaa9, 0x315b_fae4_8ade_2146);
assert_eq!(g.generate(), 0xf986_95e1);
assert_eq!(g.generate(), 0x7e39_20e2);
This crate is no_std
compatible.