mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
.NET Standard 2.1 implements Math.Clamp , use it instead of MathHelper.Clamp from osuTK.
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Lists;
|
||||
using osu.Game.Rulesets.Timing;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
{
|
||||
@ -59,7 +59,7 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
}
|
||||
}
|
||||
|
||||
i = MathHelper.Clamp(i, 0, controlPoints.Count - 1);
|
||||
i = Math.Clamp(i, 0, controlPoints.Count - 1);
|
||||
|
||||
return controlPoints[i].StartTime + (position - pos) * timeRange / controlPoints[i].Multiplier / scrollLength;
|
||||
}
|
||||
|
Reference in New Issue
Block a user