blob: 9e77714d672dc1f1853659dfecdcc035da471535 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package cc.polyfrost.oneconfig.gui.animations;
public class EaseInQuartReversed extends Animation {
/**
* @param duration The duration of the animation
* @param start The start of the animation
* @param end The end of the animation
* @param reverse Reverse the animation
*/
public EaseInQuartReversed(float duration, float start, float end, boolean reverse) {
super(duration, start, end, reverse);
}
@Override
protected float animate(float timePassed, float duration, float start, float change) {
float x = timePassed / duration;
if (x < 0.5f) return (float) (16 * Math.pow(x, 4) * change + start);
return (float) (Math.pow(2 * x - 2, 4) * change + start);
}
}
|