rescale_coordinates function

Rescale x-y coordinates