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

@ -36,6 +36,16 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
/// <returns>The absolute spatial position.</returns>
float PositionAt(double time, double currentTime, double timeRange, float scrollLength);
/// <summary>
/// Computes the time which brings a point to a provided spatial position given the current time.
/// </summary>
/// <param name="position">The absolute spatial position.</param>
/// <param name="currentTime">The current time.</param>
/// <param name="timeRange">The amount of visible time.</param>
/// <param name="scrollLength">The absolute spatial length through <see cref="timeRange"/>.</param>
/// <returns>The time at which <see cref="PositionAt(t)"/> == <paramref name="position"/>.</returns>
double TimeAt(float position, double currentTime, double timeRange, float scrollLength);
/// <summary>
/// Resets this <see cref="IScrollAlgorithm"/> to a default state.
/// </summary>