/**
 * ---- Common easing utility ------------------------------------------------
 */ 0 ; param ratio export function easeLinear ( ratio ) { return ratio ; } param ratio export function easeOutQuad ( ratio ) { return - Math . pow ( ratio - 1 , 2 ) + 1 ; } param ratio export function easeOutCubic ( ratio ) { return Math . pow ( ratio - 1 , 3 ) + 1 ; } param ratio export function easeOutQuart ( ratio ) { return - Math . pow ( ratio - 1 , 4 ) + 1 ; } const EASE_OUT_BACK_DEFAULT_COEFFICIENT = 1.70158 ; param ratio export function easeOutBack ( ratio ) { const r = ratio - 1 ; return ( ( EASE_OUT_BACK_DEFAULT_COEFFICIENT + 1 ) * Math . pow ( r , 3 ) + EASE_OUT_BACK_DEFAULT_COEFFICIENT * Math . pow ( r , 2 ) + 1 ) ; } /**
 * Easing function.
 */ export interface Easing { ( ratio ) : number ; } param exponent export function getEasingFunction ( exponent ) { switch ( Math . floor ( exponent ) ) { default : case 1 : return easeLinear ; case 2 : return easeOutQuad ; case 3 : return easeOutCubic ; case 4 : return easeOutQuart ; } }