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:
parent
596a01661c
commit
9a47428bfd
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user