mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 21:35:53 +00:00
34 lines
No EOL
785 B
C#
34 lines
No EOL
785 B
C#
using GTweens.Easings;
|
|
|
|
namespace GTweens.Interpolators
|
|
{
|
|
public sealed class FloatInterpolator : IInterpolator<float>
|
|
{
|
|
public static readonly FloatInterpolator Instance = new();
|
|
|
|
FloatInterpolator()
|
|
{
|
|
|
|
}
|
|
|
|
public float Evaluate(
|
|
float initialValue,
|
|
float finalValue,
|
|
float time,
|
|
EasingDelegate easingDelegate
|
|
)
|
|
{
|
|
return easingDelegate(initialValue, finalValue, time);
|
|
}
|
|
|
|
public float Subtract(float initialValue, float finalValue)
|
|
{
|
|
return finalValue - initialValue;
|
|
}
|
|
|
|
public float Add(float initialValue, float finalValue)
|
|
{
|
|
return finalValue + initialValue;
|
|
}
|
|
}
|
|
} |