Swapped width and height if the target is over 45 degrees vertical