diff --git a/js/util.js b/js/util.js index 0c73f13..e555757 100644 --- a/js/util.js +++ b/js/util.js @@ -169,8 +169,7 @@ function addWithCapEfficiency(a, cap, strength = 2) { function sumGeometricSeries(base, rate, n, owned = 0) { base *= rate ** owned; - if (n == 1) return base; - return base * (1 - rate ** (n + 1)) / (1 - rate); + return base * (1 - rate ** n) / (1 - rate); } function maxGeometricSeries(base, rate, amount, owned = 0) { base *= rate ** owned;