1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 06:13:04 +08:00

Remove out of date comment

This commit is contained in:
smoogipoo 2020-01-29 14:40:42 +09:00
parent 596a01661c
commit 9a47428bfd

View File

@ -131,10 +131,8 @@ namespace osu.Game.Screens.Edit
public double SnapTime(double time, double? referenceTime) public double SnapTime(double time, double? referenceTime)
{ {
var timingPoint = ControlPointInfo.TimingPointAt(referenceTime ?? time); var timingPoint = ControlPointInfo.TimingPointAt(referenceTime ?? time);
var beatLength = timingPoint.BeatLength / BeatDivisor; var beatLength = timingPoint.BeatLength / BeatDivisor;
// A 1ms offset prevents rounding errors due to minute variations in duration
return timingPoint.Time + (int)Math.Round((time - timingPoint.Time) / beatLength, MidpointRounding.AwayFromZero) * beatLength; return timingPoint.Time + (int)Math.Round((time - timingPoint.Time) / beatLength, MidpointRounding.AwayFromZero) * beatLength;
} }