mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +08:00
Rewrite backwards assertion
This commit is contained in:
parent
0cf925dadf
commit
3a0586a8f5
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// </returns>
|
||||
public static double? CalculateUnstableRate(this IEnumerable<HitEvent> hitEvents)
|
||||
{
|
||||
Debug.Assert(!hitEvents.Any(ev => ev.GameplayRate == null));
|
||||
Debug.Assert(hitEvents.All(ev => ev.GameplayRate != null));
|
||||
|
||||
// Division by gameplay rate is to account for TimeOffset scaling with gameplay rate.
|
||||
double[] timeOffsets = hitEvents.Where(affectsUnstableRate).Select(ev => ev.TimeOffset / ev.GameplayRate!.Value).ToArray();
|
||||
|
Loading…
Reference in New Issue
Block a user