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