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

ElasticEaseIn() 공개 정적인 메소드

Easing equation function for an elastic (exponentially decaying sine wave) easing in: accelerating from zero velocity.
public static ElasticEaseIn ( 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 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;
        }