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