Add IScrollAlgorithm.TimeAt()

This commit is contained in:
smoogipoo
2018-11-09 19:55:48 +09:00
parent aee7a80e71
commit b9b20607af
7 changed files with 256 additions and 0 deletions

View File

@ -17,6 +17,9 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
public float PositionAt(double time, double currentTime, double timeRange, float scrollLength)
=> (float)((time - currentTime) / timeRange * scrollLength);
public double TimeAt(float position, double currentTime, double timeRange, float scrollLength)
=> position * timeRange / scrollLength + currentTime;
public void Reset()
{
}