Crates.io | mersenne-twister-m |
lib.rs | mersenne-twister-m |
version | 0.3.0 |
source | src |
created_at | 2022-05-04 20:47:57.984671 |
updated_at | 2023-06-30 13:17:25.338827 |
description | mersenne twister pseudorandom number generator |
homepage | |
repository | https://github.com/mztikk/mersenne-twister |
max_upload_size | |
id | 580625 |
size | 49,469 |
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