findScaleToFit
findScaleToFit(
source
,destination
):number
Defined in: src/util/misc/findScaleTo.ts:11
Finds the scale for the object source to fit inside the object destination, keeping aspect ratio intact. respect the total allowed area for the cache.
Parameters
source
natural unscaled size of the object
destination
natural unscaled size of the object
Returns
number
scale factor to apply to source to fit into destination