mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 19:53:08 +08:00
Clamp relative position of judgement ticks in range [0;1]
This commit is contained in:
parent
e21db7dbbe
commit
0953751d24
@ -1,6 +1,7 @@
|
||||
// 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 System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
@ -224,7 +225,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
||||
, arrow_move_duration, Easing.Out);
|
||||
}
|
||||
|
||||
private float getRelativeJudgementPosition(double value) => (float)((value / maxHitWindow) + 1) / 2;
|
||||
private float getRelativeJudgementPosition(double value) => Math.Clamp((float)((value / maxHitWindow) + 1) / 2, 0, 1);
|
||||
|
||||
private class JudgementLine : CompositeDrawable
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user