Take frequency into account when computing score for numerical habits

This commit is contained in:
2020-09-15 22:21:23 -05:00
parent 31d631b155
commit ae286cec14

View File

@@ -296,7 +296,7 @@ public abstract class ScoreList implements Iterable<Score>
rollingSum -= checkmarkValues[offset + denominator]; rollingSum -= checkmarkValues[offset + denominator];
} }
double percentageCompleted = Math.min(1, rollingSum / 1000 / habit.getTargetValue()); double percentageCompleted = Math.min(1, rollingSum / 1000 / habit.getTargetValue());
previousValue = Score.compute(1.0, previousValue, percentageCompleted); previousValue = Score.compute(freq, previousValue, percentageCompleted);
} }
else if (checkmarkValues[offset] != Checkmark.SKIP) else if (checkmarkValues[offset] != Checkmark.SKIP)
{ {