mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Document why beatLength can be NaN
This commit is contained in:
parent
ec9daec93b
commit
c9f364d6a0
@ -373,6 +373,8 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
string[] split = line.Split(',');
|
string[] split = line.Split(',');
|
||||||
|
|
||||||
double time = getOffsetTime(Parsing.ParseDouble(split[0].Trim()));
|
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);
|
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.
|
// If beatLength is NaN, speedMultiplier should still be 1 because all comparisons against NaN are false.
|
||||||
|
Loading…
Reference in New Issue
Block a user