Fix GetClosestBeatDivisor returning the wrong divisor

This commit is contained in:
Justus Franklin Tumacder 2021-05-01 14:13:42 +08:00
parent fdf8c12947
commit 0d077b7a5d

View File

@ -7,6 +7,7 @@ using System.Linq;
using Newtonsoft.Json;
using osu.Framework.Bindables;
using osu.Framework.Lists;
using osu.Framework.Utils;
using osu.Game.Screens.Edit;
namespace osu.Game.Beatmaps.ControlPoints
@ -195,7 +196,7 @@ namespace osu.Game.Beatmaps.ControlPoints
{
double distanceFromSnap = Math.Abs(time - getClosestSnappedTime(timingPoint, time, divisor));
if (distanceFromSnap < closestTime)
if (Precision.DefinitelyBigger(closestTime, distanceFromSnap))
{
closestDivisor = divisor;
closestTime = distanceFromSnap;