mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-29 17:34:58 +03:00
make_degenerate_crosswalks broke on huge_seattle, dodge tiny lines
This commit is contained in:
parent
47e38f6fa6
commit
3a5e9c5a29
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user