package speiger.src.coreengine.math.easing;

import speiger.src.coreengine.math.MathUtils;

public interface IEasing {
	public static final IEasing SINE_IN = EasingFunctions::easeInSine;
	public static final IEasing SINE_OUT = EasingFunctions::easeOutSine;
	public static final IEasing SINE_IN_OUT = EasingFunctions::easeInOutSine;
	
	public static final IEasing SQRT_IN = EasingFunctions::easeInSqrt;
	public static final IEasing SQRT_OUT = EasingFunctions::easeOutSqrt;
	public static final IEasing SQRT_IN_OUT = EasingFunctions::easeInOutSqrt;
	
	public static final IEasing QUAD_IN = EasingFunctions::easeInQuad;
	public static final IEasing QUAD_OUT = EasingFunctions::easeOutQuad;
	public static final IEasing QUAD_IN_OUT = EasingFunctions::easeInOutQuad;
	
	public static final IEasing EXPO_IN = EasingFunctions::easeInExpo;
	public static final IEasing EXPO_OUT = EasingFunctions::easeOutExpo;
	public static final IEasing EXPO_IN_OUT = EasingFunctions::easeInOutExpo;
	
	public double ease(double progress);
	
	public default double ease(double progress, double max) {
		return ease(MathUtils.clamp(progress/max, 0D, 1D));
	}
}
