import type { TEasingFn } from './types' ; export const easeInCubic = ( range , time ) => { return range * time * time * time ; } ; export const easeInOutCubic = ( range , time ) => { if ( ( time *= 2 ) < 1 ) { return range / 2 * time * time * time ; } return range / 2 * ( ( time -= 2 ) * time * time + 2 ) ; } ; export const easeInOutQuad = ( range , time ) => { if ( ( time *= 2 ) < 1 ) { return range / 2 * time * time ; } return - range / 2 * ( ( -- time ) * ( time - 2 ) - 1 ) ; } ; export const easeInQuad = ( to , time ) => { return to * time * time ; } ; export const easeLinear = ( range , time ) => { return time * range ; } ; export const easeOutCubic = ( range , time ) => { return range * ( ( time -= 1 ) * time * time + 1 ) ; } ; export const easeOutQuad = ( range , time ) => { return - range * time * ( time - 2 ) ; } ;