mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 00:53:19 +08:00
Fix logic in recalculateValues()
This commit is contained in:
parent
b79967a9f9
commit
159cacf9c7
@ -139,18 +139,19 @@ namespace osu.Game.Screens.Play
|
||||
if (values == null)
|
||||
{
|
||||
for (float i = 0; i < ColumnCount; i++)
|
||||
{
|
||||
newValues.Add(0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int max = values.Max();
|
||||
|
||||
float step = values.Length / (float)ColumnCount;
|
||||
|
||||
for (float i = 0; i < values.Length; i += step)
|
||||
{
|
||||
newValues.Add((float)values[(int)i] / max);
|
||||
}
|
||||
}
|
||||
|
||||
calculatedValues = newValues.ToArray();
|
||||
|
Loading…
Reference in New Issue
Block a user