Mersenne Twister(MT19937) implementation in Rust. Found on crates as mersenne-twister-m
Create MT19937 instance with either default seed
let mut mt = MT19937::default();
let mut mt = MT19937::new();
or a custom seed
let mut mt = MT19937::new_with_seed(4537);
generate or peek random value with
mt.genrand()
mt.peek()
Build with
cargo build
Run tests with
cargo test