public static double ElasticEaseIn(double t, double b, double c, double d) { if ((t /= d) == 1) { return b + c; } var p = d * .3; var s = p / 4; return -(c * Math.Pow(2, 10 * (t -= 1)) * Math.Sin((t * d - s) * (2 * Math.PI) / p)) + b; }