Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust rounding tolerance in distance snap grid ring colour logic #32011

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected Color4 GetColourForIndexFromPlacement(int placementIndex)
// 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);
Expand Down
Loading