Skip to main content

rand_shuffle

Macro rand_shuffle 

Source
macro_rules! rand_shuffle {
    ($rng:expr, $slice:expr) => { ... };
}
Expand description

Fisher-Yates shuffle in place.

ยงExamples

use vrd::{Random, rand_shuffle};

let mut rng = Random::from_u64_seed(42);
let mut nums = [1, 2, 3];
rand_shuffle!(rng, &mut nums);