1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 06:20:02 +08:00

Remove median/mode slider velocity display

The intention was to give an idea of what the most common velocity of
the beatmap is, but in hindsight, because the "base" velocity is being
set elsewhere this doesn't make sense. It will/should be 1.0x.

Showing this range is still valuable, though.
This commit is contained in:
Dean Herbert
2023-05-07 13:21:39 +09:00
Unverified
parent b109ee74a6
commit 31de4de720
@@ -159,20 +159,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
double[] sliderVelocities = EditorBeatmap.HitObjects.OfType<IHasSliderVelocity>().Select(sv => sv.SliderVelocity).OrderBy(v => v).ToArray();
if (sliderVelocities.Length < 2)
return;
if (sliderVelocities.First() != sliderVelocities.Last())
{
AddHeader("Used velocity range");
AddValue($"{sliderVelocities.First():#,0.00}x - {sliderVelocities.Last():#,0.00}x");
}
double? modeSliderVelocity = sliderVelocities.GroupBy(v => v).MaxBy(v => v.Count())?.Key;
double? medianSliderVelocity = sliderVelocities[sliderVelocities.Length / 2];
AddHeader("Average velocity");
AddValue($"{medianSliderVelocity:#,0.00}x");
AddHeader("Most used velocity");
AddValue($"{modeSliderVelocity:#,0.00}x");
AddHeader("Velocity range");
AddValue($"{sliderVelocities.First():#,0.00}x - {sliderVelocities.Last():#,0.00}x");
}
protected override void Dispose(bool isDisposing)