Exclude misses and empty window hits from UR calculation

This commit is contained in:
Bartłomiej Dach 2020-08-31 14:29:01 +02:00
parent 3b22b891d1
commit 3ca2a7767a
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ public class UnstableRate : SimpleStatisticItem<double>
public UnstableRate(IEnumerable<HitEvent> hitEvents)
: base("Unstable Rate")
{
var timeOffsets = hitEvents.Select(ev => ev.TimeOffset).ToArray();
var timeOffsets = hitEvents.Where(e => !(e.HitObject.HitWindows is HitWindows.EmptyHitWindows) && e.Result != HitResult.Miss)
.Select(ev => ev.TimeOffset).ToArray();
Value = 10 * standardDeviation(timeOffsets);
}