Function drain_random

Source
pub fn drain_random<T>(vec: &mut Vec<T>, random: &GameRng) -> Option<T>
Expand description

Remove and return a uniformly-random element from vec, returning None floor(random_f64() * len), clamped, then remove(idx).