mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
use Precision.AlmostEquals
for bounds check
This commit is contained in:
parent
0531c010eb
commit
ee40444fd3
@ -276,7 +276,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
||||
|
||||
foreach (double p in notchPercentages)
|
||||
{
|
||||
if (targetAccuracy > p - NOTCH_WIDTH_PERCENTAGE / 2 && targetAccuracy < p + NOTCH_WIDTH_PERCENTAGE / 2)
|
||||
if (Precision.AlmostEquals(p, targetAccuracy, NOTCH_WIDTH_PERCENTAGE / 2))
|
||||
{
|
||||
int tippingDirection = targetAccuracy - p >= 0 ? 1 : -1; // We "round up" here to match rank criteria
|
||||
targetAccuracy = p + tippingDirection * (NOTCH_WIDTH_PERCENTAGE / 2);
|
||||
|
Loading…
Reference in New Issue
Block a user