Take frequency into account when computing score for numerical habits

pull/655/head
Alinson S. Xavier 5 years ago
parent 31d631b155
commit ae286cec14

@ -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)
{ {

Loading…
Cancel
Save