export const clamp = ( number , min = 0 , max = 1 ) : number => { return number > max ? max : number < min ? min : number ; } ; export const round = ( number , digits = 0 , base = Math . pow ( 10 , digits ) ) : number => { return Math . round ( base * number ) / base ; } ;