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

Adjust rounding tolerance in distance snap grid ring colour logic

This commit is contained in:
Bartłomiej Dach 2025-02-21 12:05:23 +01:00
parent a556049c1b
commit a690b0bae9
No known key found for this signature in database

View File

@ -159,7 +159,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
// in case 2, we want *flooring* to occur, to prevent a possible off-by-one
// because of the rounding snapping forward by a chunk of time significantly too high to be considered a rounding error.
// the tolerance margin chosen here is arbitrary and can be adjusted if more cases of this are found.
if (Precision.DefinitelyBigger(beatIndex, fractionalBeatIndex, 0.005))
if (Precision.DefinitelyBigger(beatIndex, fractionalBeatIndex, 0.01))
beatIndex = (int)Math.Floor(fractionalBeatIndex);
var colour = BindableBeatDivisor.GetColourFor(BindableBeatDivisor.GetDivisorForBeatIndex(beatIndex + placementIndex + 1, beatDivisor.Value), Colours);