Returns a function that divides numbers or points by the largest dimension of rect.
rect
const d = dividerByLargestDimension({width:100,height:50});d(50); // 0.5 (50/100)d({ x: 10, y: 20 }); // { x: 0.1, y: 0.2 } Copy
const d = dividerByLargestDimension({width:100,height:50});d(50); // 0.5 (50/100)d({ x: 10, y: 20 }); // { x: 0.1, y: 0.2 }
Returns a function that divides numbers or points by the largest dimension of
rect
.