x is double type, compare this correctly.
fabs(route.points[0].x - route.points[1].x) < 1e-8