Use MaxBy in all locations that can and update inspection level to match dotnet-build

This commit is contained in:
Dean Herbert
2022-12-19 16:42:21 +09:00
parent 8a01a22612
commit 4a7d7c6ed9
14 changed files with 17 additions and 28 deletions

View File

@ -479,7 +479,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
// copied from SliderBar so we can do custom spacing logic.
float xPosition = (ToLocalSpace(screenSpaceMousePosition).X - RangePadding) / UsableWidth;
CurrentNumber.Value = beatDivisor.ValidDivisors.Value.Presets.OrderBy(d => Math.Abs(getMappedPosition(d) - xPosition)).First();
CurrentNumber.Value = beatDivisor.ValidDivisors.Value.Presets.MinBy(d => Math.Abs(getMappedPosition(d) - xPosition));
OnUserChange(Current.Value);
}