LogDecelerateInterpolatorpublic class LogDecelerateInterpolator extends Object implements android.animation.TimeInterpolator
Fields Summary |
---|
int | mBase | int | mDrift | final float | mLogScale |
Constructors Summary |
---|
public LogDecelerateInterpolator(int base, int drift)
mBase = base;
mDrift = drift;
mLogScale = 1f / computeLog(1, mBase, mDrift);
|
Methods Summary |
---|
static float | computeLog(float t, int base, int drift)
return (float) -Math.pow(base, -t) + 1 + (drift * t);
| public float | getInterpolation(float t)
return computeLog(t, mBase, mDrift) * mLogScale;
|
|