Created
May 26, 2015 07:17
-
-
Save amyu/b3cf6d71908802517ca3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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