[][src]Function mc_sim::stats::item_drop_probability

pub fn item_drop_probability(drop_list: &[DropConfig], item: Item) -> f64

Computes the mean probability of getting a specific item drop from a drop list. Assumes that the drop list only has the item once in the list.

assert_eq!(stats::item_drop_probability(drop_list::blaze_drop_list(7).list(), Item::BlazeRod), 1.0);
assert_eq!(stats::item_drop_probability(drop_list::barter_drop_list(10, 10).list(), Item::EnderPearl), 20.0 / 423.0);