Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public class AttenuationInterpolator implements Interpolator {
public AttenuationInterpolator() {
}
@SuppressWarnings({"UnusedDeclaration"})
public AttenuationInterpolator(Context context, AttributeSet attrs) {
}
@Override
public float getInterpolation(float v) {
//y = -e^-x * cos14.12x + 1
return -1 * (float) Math.pow(Math.E, -3 * v) * (float) Math.cos(20.42034 * v) + 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment