/// <summary> /// Calculate a Ease OutIn from a pourcent /// </summary> /// <param name="linearStep">Pourcent on the ease</param> /// <param name="type">Easing Type</param> public static float EaseOutIn(float linearStep, EasingType type) { switch (type) { case EasingType.Step: return(Mathf.Round(linearStep)); default: case EasingType.Linear: return(linearStep); case EasingType.Sine: return(Sine.EaseOutIn(linearStep)); case EasingType.Quadratic: return(Power.EaseOutIn(linearStep, 2)); case EasingType.Cubic: return(Power.EaseOutIn(linearStep, 3)); case EasingType.Quartic: return(Power.EaseOutIn(linearStep, 4)); case EasingType.Quintic: return(Power.EaseOutIn(linearStep, 5)); case EasingType.Elastic: return(Elastic.EaseOutIn(linearStep)); case EasingType.Bounce: return(Bounce.EaseOutIn(linearStep)); case EasingType.Back: return(Back.EaseOutIn(linearStep)); case EasingType.Expo: return(Expo.EaseOutIn(linearStep)); case EasingType.Circ: return(Circ.EaseOutIn(linearStep)); } }