rand_num_gen

Crates.iorand_num_gen
lib.rsrand_num_gen
version0.1.0
sourcesrc
created_at2017-11-04 04:51:26.798926
updated_at2017-11-04 04:51:26.798926
descriptionrandom number generator trait
homepagehttps://gitlab.com/nathanfaucett/rs-rand_num_gen
repositoryhttps://gitlab.com/nathanfaucett/rs-rand_num_gen.git
max_upload_size
id38091
size3,166,834
Nathan Faucett (nathanfaucett)

documentation

README

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);
}
Commit count: 3

cargo fmt