public abstract class TimeFunction extends Object
| Constructor and Description |
|---|
TimeFunction(int start,
int end,
int duration)
Every time function varies a value from some starting value to some
ending value over some duration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fastForward(long timeDelta)
Called to fast forward our time stamps if we are ever paused and
need to resume where we left off.
|
int |
getValue(long tickStamp)
Returns the current value given the supplied time stamp.
|
void |
init(long tickStamp)
Configures this function with a starting time.
|
public TimeFunction(int start,
int end,
int duration)
Note: it is assumed that we will operate with relatively short durations such that integer arithmetic may be used rather than long arithmetic.
public void init(long tickStamp)
getValue(long) will be
used to obtain a starting time stamp.public void fastForward(long timeDelta)
public int getValue(long tickStamp)
_duration (and above)
respectively.Copyright © 2015. All rights reserved.