A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osu.Framework.Graphics.Transforms;
5
6namespace osu.Framework.Utils
7{
8 /// <summary>
9 /// An interface that defines the interpolation of a value.
10 /// </summary>
11 /// <typeparam name="TValue">The type of value to be interpolated..</typeparam>
12 public interface IInterpolable<TValue>
13 {
14 /// <summary>
15 /// Interpolates between two <typeparamref name="TValue"/>s.
16 /// </summary>
17 /// <remarks>
18 /// This method MUST NOT modify the current object.
19 /// </remarks>
20 /// <param name="time">The current time.</param>
21 /// <param name="startValue">The <typeparamref name="TValue"/> at <paramref name="time"/> = <paramref name="startTime"/>.</param>
22 /// <param name="endValue">The <typeparamref name="TValue"/> at <paramref name="time"/> = <paramref name="endTime"/>.</param>
23 /// <param name="startTime">The start time.</param>
24 /// <param name="endTime">The end time.</param>
25 /// <param name="easing">The easing function to use.</param>
26 /// <returns>The interpolated value.</returns>
27 TValue ValueAt<TEasing>(double time, TValue startValue, TValue endValue, double startTime, double endTime, in TEasing easing) where TEasing : IEasingFunction;
28 }
29}