findScaleToCover
findScaleToCover(
source
,destination
):number
Defined in: src/util/misc/findScaleTo.ts:25
Finds the scale for the object source to cover entirely the object destination, keeping aspect ratio intact. respect the total allowed area for the cache.
Parameters
Section titled “Parameters”source
Section titled “source”natural unscaled size of the object
destination
Section titled “destination”natural unscaled size of the object
Returns
Section titled “Returns”number
scale factor to apply to source to cover destination