1 2 3
export const numberWithinRange = (num: number, min: number, max: number) => { return Math.min(Math.max(num, min), max) }