From e2a94ecf56f5c935d516ecc67d2c3b266338591c Mon Sep 17 00:00:00 2001 From: Jay Lawton Date: Wed, 15 Jan 2025 20:13:11 +1000 Subject: [PATCH] use isNormal to validate ratio --- .../Difficulty/Evaluators/RhythmEvaluator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/RhythmEvaluator.cs b/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/RhythmEvaluator.cs index ca0d5c373f..7d58eada5e 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/RhythmEvaluator.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/RhythmEvaluator.cs @@ -22,11 +22,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators } /// - /// To prevent against infinite ratio values where maps breach regular mapping conditions, we validate the ratio. + /// Validates the ratio by ensuring it is a normal number in cases where maps breach regular mapping conditions. /// private static double validateRatio(double ratio) { - return double.IsInfinity(ratio) || double.IsNaN(ratio) ? 0 : ratio; + return double.IsNormal(ratio) ? ratio : 0; } ///