how to rotate coordinates 90 degrees