Round X and Y to nearest integer num and new scaling method