1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 00:07:19 +08:00

Move inverting value to happen outside clamp

Looks to have no effect, but makes sense to happen outside instead.
This commit is contained in:
Salman Ahmed 2022-05-06 18:54:08 +03:00
parent d78f1d158d
commit 723fce8174

View File

@ -132,7 +132,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
return;
float distanceForCurrentTime = snapProvider.DurationToDistance(referenceObject, editorClock.CurrentTime - referenceObject.GetEndTime());
float timeBasedAlpha = Math.Clamp(1 - Math.Abs(distanceForCurrentTime - Size.X / 2) / 30, 0, 1);
float timeBasedAlpha = 1 - Math.Clamp(Math.Abs(distanceForCurrentTime - Size.X / 2) / 30, 0, 1);
Colour = baseColour.Opacity(Math.Max(baseColour.A, timeBasedAlpha));
}