public static TweenEasing fromTo(Func <float> from,
                                         Func <float> to,
                                         float duration,
                                         TweenEase easing         = null,
                                         TweenUpdate onUpdate     = null,
                                         TweenStart onStart       = null,
                                         TweenComplete onComplete = null,
                                         TweenCancel onCancel     = null)
        {
            if (from == null)
            {
                throw new ArgumentNullException("from");
            }

            if (to == null)
            {
                throw new ArgumentNullException("to");
            }

            easing = easing ?? Easings.Linear;

            return(new TweenEasing
            {
                fromGetter = from,
                toGetter = to,
                easing = easing,
                duration = duration,
                externUpdate = onUpdate,
                externStart = onStart,
                externComplete = onComplete,
                externCancel = onCancel,
            });
        }
        public static TweenEasing fromTo(float from,
                                         float to,
                                         float duration,
                                         TweenEase easing         = null,
                                         TweenUpdate onUpdate     = null,
                                         TweenStart onStart       = null,
                                         TweenComplete onComplete = null,
                                         TweenCancel onCancel     = null)
        {
            easing = easing ?? Easings.Linear;

            return(new TweenEasing
            {
                from = from,
                to = to,
                easing = easing,
                duration = duration,
                externUpdate = onUpdate,
                externStart = onStart,
                externComplete = onComplete,
                externCancel = onCancel,
            });
        }