Compute zoom + pan that centers contentW x contentH (content units) inside a viewportW x viewportH (pixel) rect. paddingPx is uniform pixel padding on every side.
contentW x contentH
viewportW x viewportH
paddingPx
Optional
Compute zoom + pan that centers
contentW x contentH(content units) inside aviewportW x viewportH(pixel) rect.paddingPxis uniform pixel padding on every side.