Macro vrd::rand_normal
source · macro_rules! rand_normal { ($rng:expr, $mu:expr, $sigma:expr) => { ... }; }
Expand description
Generate a normally distributed random number with the given mean and standard deviation.
§Examples
use vrd::rand_normal;
let mut rng = vrd::random::Random::new();
let normal_number = rand_normal!(rng, 0.0, 1.0);
println!("Normal number: {}", normal_number);
§Arguments
rng
- A mutable reference to aRandom
instance.mu
- The mean of the normal distribution.sigma
- The standard deviation of the normal distribution.
§Returns
A randomly generated normal distributed number.