Function onejoker::utils::oj_shuffle

source ·
pub fn oj_shuffle<T>(a: &mut [T], rng: &mut Random)
Expand description

§wiki | Standard Fisher-Yates shuffle

use onejoker::prelude::*;
use onejoker::utils::{Random, oj_shuffle};

let mut rng = Random::new();
let mut v = [1,2,3,4,5,6,7,8,9,10];
oj_shuffle(&mut v, &mut rng);