Skip to main content

choose_weighted

Function choose_weighted 

Source
pub(super) fn choose_weighted<R: Rng + ?Sized>(
    entries: &[WeightedSpawnData],
    random: &mut R,
) -> Option<usize>
Expand description

Returns the index of a weighted pick from entries.