Function break_infinity::afford_arithmetic_series[][src]

pub fn afford_arithmetic_series(
    resources_available: &Decimal,
    price_start: &Decimal,
    price_add: &Decimal,
    current_owned: &Decimal
) -> Decimal
Expand description

If you’re willing to spend ‘resourcesAvailable’ and want to buy something with additively increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned), how much of it can you buy?