function f = inside_road(ey, road)

max_lane = road.lanes(end);
max_ey = max_lane.ey + max_lane.width/2;
min_lane = road.lanes(1);  
min_ey = min_lane.ey - min_lane.width/2;

f = (ey <= max_ey &&  ey >= min_ey);  
