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

半正規分布

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

使用例 1

let half_normal = rand_simple::create_half_normal!(1192u32, 765u32);
assert_eq!(half_normal.sample(), 1.8943489630074781f64);

使用例 2

let half_normal = rand_simple::create_half_normal!();
println!("乱数: {}", half_normal.sample()); // インスタンス生成時刻に依存するため、コンパイル時は値不明