1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 11:12:54 +08:00

Add missing xmldoc

This commit is contained in:
Dean Herbert 2022-02-28 19:14:43 +09:00
parent a41e1c80f1
commit 159db38f8a

View File

@ -22,6 +22,13 @@ namespace osu.Game.Rulesets.Scoring
return 10 * standardDeviation(timeOffsets);
}
/// <summary>
/// Calculates the average hit offset/error for a sequence of <see cref="HitEvent"/>s, where negative numbers mean the user hit too early on average.
/// </summary>
/// <returns>
/// A non-null <see langword="double"/> value if unstable rate could be calculated,
/// and <see langword="null"/> if unstable rate cannot be calculated due to <paramref name="hitEvents"/> being empty.
/// </returns>
public static double? CalculateAverageHitError(this IEnumerable<HitEvent> hitEvents) =>
hitEvents.Where(affectsUnstableRate).Select(ev => ev.TimeOffset).Average();