mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(math-helpers): diminishingReturns parameter logic
This commit is contained in:
@@ -40,7 +40,7 @@ function tnl (lvl) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function diminishingReturns (bonus, max, halfway) {
|
function diminishingReturns (bonus, max, halfway) {
|
||||||
if (halfway === null) {
|
if (!halfway) {
|
||||||
halfway = max / 2;
|
halfway = max / 2;
|
||||||
}
|
}
|
||||||
return max * (bonus / (bonus + halfway));
|
return max * (bonus / (bonus + halfway));
|
||||||
|
|||||||
Reference in New Issue
Block a user