public override float Interpolate(float theBlend)
        {
            switch (mode)
            {
            case CCInterpolationMode.IN:
                return(CCMath.Sq(theBlend));

            case CCInterpolationMode.OUT:
                return(-(theBlend) * (theBlend - 2));
            }
            if (theBlend < 0.5)
            {
                return(2 * theBlend * theBlend);
            }
            return(1 - 2 * CCMath.Sq(1 - theBlend));
        }
        public override float Interpolate(float theBlend)
        {
            switch (mode)
            {
            case CCInterpolationMode.IN:
                return(1 - CCMath.Sqrt(1 - theBlend * theBlend));

            case CCInterpolationMode.OUT:
                theBlend = 1 - theBlend;
                return(CCMath.Sqrt(1 - theBlend * theBlend));
            }
            theBlend *= 2;
            if (theBlend < 1)
            {
                return(-0.5f * (CCMath.Sqrt(1 - theBlend * theBlend) - 1));
            }
            return(0.5f * (CCMath.Sqrt(1 - CCMath.Sq(2 - theBlend)) + 1));
        }