chore: reorg

This commit is contained in:
2020-10-17 11:54:43 +08:00
parent af97622c79
commit 347ea202e1
13 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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);
}
}