mirror of https://github.com/ppy/osu
Remove incorrect double multiplication and add missing test coverage
This commit is contained in:
parent
d807d9d822
commit
29bc653d24
|
@ -125,6 +125,9 @@ public void TestConversionsWithSliderVelocity()
|
|||
assertSnapDistance(base_distance * slider_velocity, referenceObject, true);
|
||||
assertSnappedDistance(base_distance * slider_velocity + 10, base_distance * slider_velocity, referenceObject);
|
||||
assertSnappedDuration(base_distance * slider_velocity + 10, 1000, referenceObject);
|
||||
|
||||
assertDistanceToDuration(base_distance * slider_velocity, 1000, referenceObject);
|
||||
assertDurationToDistance(1000, base_distance * slider_velocity, referenceObject);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -273,7 +273,7 @@ public virtual float DurationToDistance(HitObject referenceObject, double durati
|
|||
public virtual double DistanceToDuration(HitObject referenceObject, float distance)
|
||||
{
|
||||
double beatLength = BeatSnapProvider.GetBeatLengthAtTime(referenceObject.StartTime);
|
||||
return distance / GetBeatSnapDistanceAt(referenceObject) * beatLength * referenceObject.DifficultyControlPoint.SliderVelocity;
|
||||
return distance / GetBeatSnapDistanceAt(referenceObject) * beatLength;
|
||||
}
|
||||
|
||||
public virtual double FindSnappedDuration(HitObject referenceObject, float distance)
|
||||
|
|
Loading…
Reference in New Issue