Consistent ordering of Easing functions in C#
This commit is contained in:
parent
a74bbfaee2
commit
8a24448cb6
|
|
@ -992,8 +992,8 @@ namespace MuzikaGromche
|
|||
public readonly record struct Easing(string Name, Func<float, float> Eval)
|
||||
{
|
||||
public static Easing Linear = new("Linear", static x => x);
|
||||
public static Easing OutCubic = new("OutCubic", static x => 1 - Mathf.Pow(1f - x, 3f));
|
||||
public static Easing InCubic = new("InCubic", static x => x * x * x);
|
||||
public static Easing OutCubic = new("OutCubic", static x => 1 - Mathf.Pow(1f - x, 3f));
|
||||
public static Easing InOutCubic = new("InOutCubic", static x => x < 0.5f ? 4f * x * x * x : 1 - Mathf.Pow(-2f * x + 2f, 3f) / 2f);
|
||||
public static Easing InExpo = new("InExpo", static x => x == 0f ? 0f : Mathf.Pow(2f, 10f * x - 10f));
|
||||
public static Easing OutExpo = new("OutExpo", static x => x == 1f ? 1f : 1f - Mathf.Pow(2f, -10f * x));
|
||||
|
|
|
|||
Loading…
Reference in New Issue