AssemblyCSharp.Ease.ElasticEaseOut C# (CSharp) 메소드

ElasticEaseOut() 공개 정적인 메소드

Easing equation function for an elastic (exponentially decaying sine wave) easing out: decelerating from zero velocity.
public static ElasticEaseOut ( double t, double b, double c, double d ) : double
t double Current time in seconds.
b double Starting value.
c double Final value.
d double Duration of animation.
리턴 double
        public static double ElasticEaseOut(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) * Math.Sin((t * d - s) * (2 * Math.PI) / p) + c + b);
        }