public static T Lerp <T> (T a, T b, float x) where T : struct { return(Interpolators <T> .Linear( LerpSource <T> .Get(ref a, ref b), 0, Clamp(x, 0.0f, 1.0f) )); }
public static T Interpolate <T> (this Interpolator <T> interpolator, T a, T b, float progress) where T : struct { return(Interpolators <T> .Interpolate(interpolator, a, b, progress)); }
public void InterpolatorByName() { Assert.AreEqual(Interpolators <float> .GetByName("Linear"), (Interpolator <float>)Interpolators <float> .Linear); Assert.AreEqual(Interpolators <float> .GetByName("Foozle"), (Interpolator <float>)Interpolators <float> .Null); }
public static BoundInterpolator <T, Tween <T> > GetEasing <T> (Interpolators <T> .Easing ease) where T : struct { return(Interpolators <T> .Eased <Tween <T> >(ease)); }