mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 11:57:45 +08:00
Clamp values
This commit is contained in:
parent
9248e6290c
commit
fdf67aaa11
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user