mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-07-02 03:51:17 +00:00
Added GTWeen
This commit is contained in:
parent
457998788e
commit
2036e4e748
152 changed files with 5889 additions and 7 deletions
|
|
@ -0,0 +1,34 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue