Пример #1
0
        public double nextInterpolant()
        {
            long currentTime = java.System.currentTimeMillis();

            // When no start time is specified, begin counting time on the first run.
            if (this.startTime < 0)
            {
                this.startTime = currentTime;
            }
            // Exit when current time is before starting time.
            if (currentTime < this.startTime)
            {
                return(0);
            }

            long   elapsedTime          = currentTime - this.startTime;
            double unclampedInterpolant = ((double)elapsedTime) / ((double)this.length);

            return(AnimationSupport.clampDouble(unclampedInterpolant, 0, 1));
        }
Пример #2
0
 public double nextDouble(double interpolant)
 {
     return(AnimationSupport.mixDouble(interpolant, Begin, End));
 }