mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Simplify snap implementation
This commit is contained in:
@ -129,10 +129,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
TooltipText = newRotation.ToLocalisableString(tooltipFormat);
|
||||
}
|
||||
|
||||
private float snap(float value, float step)
|
||||
{
|
||||
float floor = MathF.Floor(value / step) * step;
|
||||
return value - floor < step / 2f ? floor : floor + step;
|
||||
}
|
||||
private float snap(float value, float step) => MathF.Round(value / step) * step;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user