mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Don't go from negative to positive or vise versa when applying bonus.
This commit is contained in:
parent
4ed48da227
commit
1405b5f149
@ -44,7 +44,10 @@ public class Boost {
|
||||
}
|
||||
|
||||
public double getFinalAmount(CurrencyType BT, double income) {
|
||||
return income + ((income > 0D ? income : -income) * getFinal(BT, false, false));
|
||||
double f = income + ((income > 0D ? income : -income) * getFinal(BT, false, false));
|
||||
if (income > 0 && f < 0 || income < 0 && f > 0)
|
||||
f = 0;
|
||||
return f;
|
||||
}
|
||||
|
||||
public double getFinal(CurrencyType BT, boolean percent, boolean excludeExtra) {
|
||||
|
Loading…
Reference in New Issue
Block a user