use rand::distributions::{
    Distribution, Uniform,
};
use rand_core::RngCore;

fn main() {
    let mut rng = rand::thread_rng();

    println!("10 rands u32");
    for _ in 0..10 {
        let u = rng.next_u32();
        println!("{}", u);
    }

    println!("10 rands -1.0 ~ 1.0");
    let range = Uniform::new(-1.0f64, 1.0);
    for _ in 0..10 {
        let a = range.sample(&mut rng);
        println!("{}", a);
    }
}