1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 03:37:20 +08:00

Clamp values

This commit is contained in:
Dean Herbert 2019-05-10 17:18:39 +09:00
parent 9248e6290c
commit fdf67aaa11

View File

@ -115,7 +115,7 @@ namespace osu.Game.Screens.Play
{
base.Update();
float newX = (float)Interpolation.Lerp(handleBase.X, NormalizedValue * UsableWidth, Time.Elapsed / 40);
float newX = (float)MathHelper.Clamp(Interpolation.Lerp(handleBase.X, NormalizedValue * UsableWidth, Time.Elapsed / 40), 0, UsableWidth);
fill.Width = newX;
handleBase.X = newX;