1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 23:40:44 +08:00

Merge pull request #32011 from bdach/adjust-distance-snap-grid-rounding-tolerance

Adjust rounding tolerance in distance snap grid ring colour logic
This commit is contained in:
Dean Herbert
2025-02-23 21:22:37 +09:00
committed by GitHub
Unverified
@@ -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);