Exemple #1
0
 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)
                ));
 }
Exemple #2
0
 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));
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 public static BoundInterpolator <T, Tween <T> > GetEasing <T> (Interpolators <T> .Easing ease)
     where T : struct
 {
     return(Interpolators <T> .Eased <Tween <T> >(ease));
 }