CSharp examples for System:Math Easing Function
Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out: decelerating from zero velocity.
using System;/* ww w . j a va2s . co m*/ public class Main{ /// <summary> /// Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out: /// decelerating from zero velocity. /// </summary> /// <param name="t">Current time in seconds.</param> /// <param name="b">Starting value.</param> /// <param name="c">Change in value.</param> /// <param name="d">Duration of animation.</param> /// <returns>The correct value.</returns> public static double BackEaseOut( double t, double b, double c, double d ) { return c * ( ( t = t / d - 1 ) * t * ( ( 1.70158 + 1 ) * t + 1.70158 ) + 1 ) + b; } }