Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Added the possibility to get the evolution rate that cancel itself (#326
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lpeyr committed Jun 4, 2022
1 parent e6216dd commit eb6fdeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LeoCorpLibrary/Maths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,8 @@ public static class Percentage
/// <param name="decreaseRate">The evolution rate, must be positive.</param>
/// <returns>A <see cref="double"/> value.</returns>
public static double GetResultPercentageDecrease(double value, double decreaseRate) => (decreaseRate >= 0) ? (1 - decreaseRate) * value : GetResultPercentageIncrease(value, decreaseRate);

public static double GetInvertedEvolutionRate(double evolutionRate) => 1 / (1 + evolutionRate) - 1;
}
}
}

0 comments on commit eb6fdeb

Please sign in to comment.