// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using osu.Game.Rulesets.Scoring; namespace osu.Game.Screens.Ranking.Statistics { /// /// Displays the unstable rate statistic for a given play. /// public partial class UnstableRate : SimpleStatisticItem { /// /// Creates and computes an statistic. /// /// Sequence of s to calculate the unstable rate based on. public UnstableRate(IEnumerable hitEvents) : base("Unstable Rate") { Value = hitEvents.CalculateUnstableRate(); } protected override string DisplayValue(double? value) => value == null ? "(not available)" : value.Value.ToString(@"N2"); } }