macro_rules! create_normal {
    () => { ... };
    ($seed_1: expr, $seed_2: expr) => { ... };
}
Expand description

正規分布

  • () => - 乱数の種は自動生成
  • ($seed_1: expr, $seed_2: expr) => - 乱数の種を指定する

使用例 1

let mut normal = rand_simple::create_normal!(1192u32, 765u32);
println!("平均値 0, 分散 1 の標準正規分布乱数を生成する -> {}", normal.sample());

使用例 2

let mut normal = rand_simple::create_normal!();
println!("平均値 0, 分散 1 の標準正規分布乱数を生成する -> {}", normal.sample());