Expose static math function used internally to calculate scaled image sizes