public final class AnimationUtils
extends java.lang.Object
| Constructor and Description |
|---|
AnimationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static float |
calculateSpeed(float location,
float minSpeed,
float maxSpeed)
Returns move animation speed depending on the animated object location.
|
public static float calculateSpeed(float location,
float minSpeed,
float maxSpeed)
Specified location must be a floating point number in the inclusive range [0.0, 1.0]. 0.0 location = object is at the start of its path. 1.0 location = object has reached the end of its path.
location - object location on its pathminSpeed - minimum desired object speed, used when object is close to path start and endmaxSpeed - maximum desired object speed, used when object is in the middle of its path