[][src]Function mc_sim::stats::item_drop_average

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

Computes the mean number of items dropped for a given item on a drop list. Assumes that the drop list only has the item once in the list.

assert_eq!(stats::item_drop_average(drop_list::blaze_drop_list(7).list(), Item::BlazeRod), 0.5);
assert_eq!(stats::item_drop_average(drop_list::barter_drop_list(10, 10).list(), Item::EnderPearl), 6.0);