Function break_infinity::sum_arithmetic_series[][src]

pub fn sum_arithmetic_series(
    num_items: &Decimal,
    price_start: &Decimal,
    price_add: &Decimal,
    current_owned: &Decimal
) -> Decimal
Expand description

How much resource would it cost to buy (numItems) items if you already have currentOwned, the initial price is priceStart and it adds priceAdd each purchase? Adapted from http://www.mathwords.com/a/arithmetic_series.htm