calculation of the scale hint