Final fixes #71
This commit is contained in:
@@ -608,10 +608,26 @@ public class Utils {
|
||||
return String.format("%02d:%02d:%02d", seconds / 3600, (seconds / 60) % 60, seconds % 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cubic ease out function
|
||||
* @param t the current time
|
||||
* @param a the starting position
|
||||
* @param b the finishing position
|
||||
* @param d the duration
|
||||
* @return the eased float
|
||||
*/
|
||||
public static float easeOut(float t, float a, float b, float d) {
|
||||
return b * ((t = t / d - 1f) * t * t + 1f) + a;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fake bounce ease function
|
||||
* @param t the current time
|
||||
* @param a the starting position
|
||||
* @param b the finishing position
|
||||
* @param d the duration
|
||||
* @return the eased float
|
||||
*/
|
||||
public static float easeBounce(float t, float a, float b, float d) {
|
||||
if (t < d / 2)
|
||||
return easeOut(t, a, b, d);
|
||||
|
||||
Reference in New Issue
Block a user