Merge "Revert "Tune app closing/launcher resume animation "spring" values."" into ub-launcher3-edmonton-polish

This commit is contained in:
Jonathan Miranda
2018-06-26 22:32:37 +00:00
committed by Android (Google) Code Review
3 changed files with 13 additions and 16 deletions
@@ -119,20 +119,18 @@ public class Interpolators {
public static final Interpolator OSCILLATE = new Interpolator() {
// Used to scale the oscillations horizontally
private final float horizontalScale = 4f;
private final float horizontalScale = 1f;
// Used to shift the oscillations horizontally
private final float horizontalShift = 0.22f;
private final float horizontalShift = 0.5f;
// Used to scale the oscillations vertically
private final float verticalScale = 1f;
// Used to shift the oscillations vertically
private final float verticalShift = 1f;
// Amplitude of oscillation
private final float amplitude = 0.9f;
@Override
public float getInterpolation(float t) {
t = horizontalScale * (t + horizontalShift);
return (float) ((verticalScale * (Math.exp(-t) * Math.cos(amplitude * Math.PI * t)))
return (float) ((verticalScale * (Math.exp(-t) * Math.cos(2 * Math.PI * t)))
+ verticalShift);
}
};