1 unstable release
Uses old Rust 2015
0.1.0 | Nov 4, 2017 |
---|
#83 in #rng
3MB
374 lines
rs-rand_num_gen
random number generator
extern crate rand_num_gen;
use rand_num_gen::{Rng, XorShift};
fn main() {
let mut rng = XorShift::new();
let x: f32 = rng.next();
let y = rng.next_u32();
let z = rng.next_usize();
let w = rng.next_f64();
println!("{:?} {:?} {:?} {:?}", x, y, z, w);
}