Beispiel #1
0
 public static float EaseInOutQuint(float from, float to, float time, float duration)
 {
     time /= duration;
     return((time / 2) < 1
         ? to / 2 * time * time * time * time * time + from
         : to / 2 * (TPMath.Pow(time - 2, 5) + 2) + from);
 }
Beispiel #2
0
 public static float EaseOutQuint(float from, float to, float time, float duration)
 {
     return(to * (TPMath.Pow(time / duration - 1, 5) + 1) + from);
 }
Beispiel #3
0
 public static float EaseOutQuart(float from, float to, float time, float duration)
 {
     return(-to * (TPMath.Pow(time / duration - 1, 4) - 1) + from);
 }
Beispiel #4
0
 public static float EaseOutCubic(float time, float from, float to, float duration)
 {
     time /= duration;
     return(to * (TPMath.Pow(time / duration - 1, 3) + 1) + from);
 }
Beispiel #5
0
 public static float EaseInOutExpo(float from, float to, float time, float duration)
 {
     return((time /= duration / 2) < 1
         ? to / 2 * TPMath.Pow(2, 10 * (time - 1)) + from
         : to / 2 * (-TPMath.Pow(2, -10 * --time) + 2) + from);
 }
Beispiel #6
0
 public static float EaseOutExpo(float from, float to, float time, float duration)
 {
     return(to * (-TPMath.Pow(2, -10 * time / duration) + 1) + from);
 }
Beispiel #7
0
 public static float EaseInExpo(float from, float to, float time, float duration)
 {
     return(to * TPMath.Pow(2, 10 * (time / duration - 1)) + from);
 }