Avoid divide by 0 bug
small speed up / -> *

Also express wR and hR as a scale usable in transform.