Skip to main content

rand_int

Macro rand_int 

Source
macro_rules! rand_int {
    ($rng:expr, $min:expr, $max:expr) => { ... };
}
Expand description

Generates an unbiased i32 in the inclusive range [min, max].

ยงExamples

use vrd::{Random, rand_int};

let mut rng = Random::from_u64_seed(42);
let n = rand_int!(rng, -10, 10);