mirror of
https://github.com/ppy/osu
synced 2025-02-22 13:37:08 +00:00
Prevent another case of potential div-by-0
This commit is contained in:
parent
e6ccca8045
commit
ad95f037de
@ -60,6 +60,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
return 0;
|
||||
|
||||
double maxStrain = objectStrains.Max();
|
||||
|
||||
if (maxStrain == 0)
|
||||
return 0;
|
||||
|
||||
return objectStrains.Aggregate((total, next) => total + (1.0 / (1.0 + Math.Exp(-(next / maxStrain * 12.0 - 6.0)))));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user