mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:47:52 +08:00
Fix TimeAtPosition
doc comment
This commit is contained in:
parent
fdb09ef4d7
commit
09f1cbde7e
@ -53,19 +53,23 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Given a position along the scrolling axis, return the time within this <see cref="HitObjectContainer"/>.
|
/// Given a position at <paramref name="currentTime"/>, return the time of the object corresponding the position.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="position">The position along the scrolling axis.</param>
|
/// <remarks>
|
||||||
/// <param name="referenceTime">The time the scrolling speed is used.</param>
|
/// If there are multiple valid time values, one arbitrary time is returned.
|
||||||
public double TimeAtPosition(float position, double referenceTime)
|
/// </remarks>
|
||||||
|
public double TimeAtPosition(float position, double currentTime)
|
||||||
{
|
{
|
||||||
flipPositionIfRequired(ref position);
|
flipPositionIfRequired(ref position);
|
||||||
return scrollingInfo.Algorithm.TimeAt(position, referenceTime, timeRange.Value, scrollLength);
|
return scrollingInfo.Algorithm.TimeAt(position, currentTime, timeRange.Value, scrollLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Given a position in screen space, return the time within this <see cref="HitObjectContainer"/>.
|
/// Given a position at the current time in screen space, return the time of the object corresponding the position.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// If there are multiple valid time values, one arbitrary time is returned.
|
||||||
|
/// </remarks>
|
||||||
public double TimeAtScreenSpacePosition(Vector2 screenSpacePosition)
|
public double TimeAtScreenSpacePosition(Vector2 screenSpacePosition)
|
||||||
{
|
{
|
||||||
Vector2 position = ToLocalSpace(screenSpacePosition);
|
Vector2 position = ToLocalSpace(screenSpacePosition);
|
||||||
|
Loading…
Reference in New Issue
Block a user