1 package aurelienribon.tweenengine.equations; 2 3 import aurelienribon.tweenengine.TweenEquation; 4 5 /** 6 * Easing equation based on Robert Penner's work: 7 * http://robertpenner.com/easing/ 8 * @author Aurelien Ribon | http://www.aurelienribon.com/ 9 */ 10 public abstract class Quint extends TweenEquation { 11 public static final Quint IN = new Quint() { 12 @Override 13 public final float compute(float t) { 14 return t*t*t*t*t; 15 } 16 17 @Override 18 public String toString() { 19 return "Quint.IN"; 20 } 21 }; 22 23 public static final Quint OUT = new Quint() { 24 @Override 25 public final float compute(float t) { 26 return (t-=1)*t*t*t*t + 1; 27 } 28 29 @Override 30 public String toString() { 31 return "Quint.OUT"; 32 } 33 }; 34 35 public static final Quint INOUT = new Quint() { 36 @Override 37 public final float compute(float t) { 38 if ((t*=2) < 1) return 0.5f*t*t*t*t*t; 39 return 0.5f*((t-=2)*t*t*t*t + 2); 40 } 41 42 @Override 43 public String toString() { 44 return "Quint.INOUT"; 45 } 46 }; 47 }