make_degenerate_crosswalks broke on huge_seattle, dodge tiny lines

This commit is contained in:
Dustin Carlino 2019-09-14 09:37:30 -07:00
parent 47e38f6fa6
commit 3a5e9c5a29

View File

@ -368,8 +368,8 @@ fn make_degenerate_crosswalks(
let l2_in = get_sidewalk(lanes, r2.incoming_lanes(i))?;
let l2_out = get_sidewalk(lanes, r2.outgoing_lanes(i))?;
let pt1 = Line::new(l1_in.last_pt(), l2_out.first_pt()).percent_along(0.5);
let pt2 = Line::new(l1_out.first_pt(), l2_in.last_pt()).percent_along(0.5);
let pt1 = Line::maybe_new(l1_in.last_pt(), l2_out.first_pt())?.percent_along(0.5);
let pt2 = Line::maybe_new(l1_out.first_pt(), l2_in.last_pt())?.percent_along(0.5);
if pt1.epsilon_eq(pt2) {
return None;