public abstract class Interpolator extends Object
Modifier and Type  Field and Description 

static Interpolator 
BOUNCE_OUT 
static Interpolator 
EASE_IN
An interpolator that starts to change slowly and ramps up to full speed.

static Interpolator 
EASE_IN_BACK
An interpolator that undershoots the starting value, then speeds up into the final value

static Interpolator 
EASE_INOUT
An interpolator that eases away from the starting value, speeds up, then eases into the
final value.

static Interpolator 
EASE_OUT
An interpolator that starts to change quickly and eases into the final value.

static Interpolator 
EASE_OUT_BACK
An interpolator that eases into the final value and overshoots it before settling on it.

static Interpolator 
EASE_OUT_ELASTIC
An interpolator that eases past the final value then back towards it elastically.

static Interpolator 
LINEAR
A linear interpolator.

static Interpolator 
NOOP
An interpolator that always returns the starting position.

Constructor and Description 

Interpolator() 
Modifier and Type  Method and Description 

abstract float 
apply(float v)
Interpolates between zero and one according to this interpolator's function.

float 
apply(float dt,
float t)
Interpolates between zero and one according to this interpolator's function.

float 
apply(float start,
float range,
float dt,
float t)
Interpolates between two values.

float 
applyClamp(float dt,
float t)
Interpolates between two values, as in
apply(float,float) except that dt is
clamped to [0..t] to avoid interpolation weirdness if dt is ever negative or exceeds
t . 
float 
applyClamp(float start,
float range,
float dt,
float t)
Interpolates between two values, as in
apply(float) except that dt is clamped to
[0..t] to avoid interpolation weirdness if dt is ever negative or exceeds t . 
public static Interpolator NOOP
public static Interpolator LINEAR
public static Interpolator EASE_IN
public static Interpolator EASE_OUT
public static Interpolator EASE_INOUT
public static Interpolator EASE_IN_BACK
public static Interpolator EASE_OUT_BACK
public static Interpolator BOUNCE_OUT
public static Interpolator EASE_OUT_ELASTIC
public abstract float apply(float v)
v
 a value between zero and one (usually elapsed/total
time).public float apply(float dt, float t)
dt
 the amount of time that has elapsed.t
 the total amount of time for the interpolation. If t == 0, the result is undefined.public float applyClamp(float dt, float t)
apply(float,float)
except that dt
is
clamped to [0..t] to avoid interpolation weirdness if dt
is ever negative or exceeds
t
.public float apply(float start, float range, float dt, float t)
start
 the starting value.range
 the difference between the ending value and the starting value.dt
 the amount of time that has elapsed.t
 the total amount of time for the interpolation. If t == 0, start+range will be
returned.public float applyClamp(float start, float range, float dt, float t)
apply(float)
except that dt
is clamped to
[0..t] to avoid interpolation weirdness if dt
is ever negative or exceeds t
.Copyright © 2019. All rights reserved.