package cc.polyfrost.oneconfig.gui.animations; public class EaseInOutQuart 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 EaseInOutQuart(int duration, float start, float end, boolean reverse) { super(duration, start, end, reverse); } @Override protected float animate(float x) { return x < 0.5 ? 8 * x * x * x * x : (float) (1 - Math.pow(-2 * x + 2, 4) / 2); } }