1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Document why beatLength can be NaN

This commit is contained in:
Khang 2022-08-24 02:10:19 -04:00
parent ec9daec93b
commit c9f364d6a0

View File

@ -373,6 +373,8 @@ namespace osu.Game.Beatmaps.Formats
string[] split = line.Split(',');
double time = getOffsetTime(Parsing.ParseDouble(split[0].Trim()));
// beatLength is allowed to be NaN to handle an edge case in which some beatmaps use NaN slider velocity to disable slider tick generation (see LegacyDifficultyControlPoint).
double beatLength = Parsing.ParseDouble(split[1].Trim(), allowNaN: true);
// If beatLength is NaN, speedMultiplier should still be 1 because all comparisons against NaN are false.