Fixed perpendicular distance calculation of segment endpoint is on equator