Handle cases where the x-axis distance cannot be calculated