woops, fix path trace's end_dist
use crate::{BusRouteID, BusStopID, LaneID, LaneType, Map, Position, Traversable, TurnID};
-use geom::{Distance, PolyLine, Pt2D, EPSILON_DIST};
+use geom::{Distance, PolyLine, Pt2D};
use ordered_float::NotNan;
use serde_derive::{Deserialize, Serialize};
use std::collections::{BinaryHeap, HashMap, VecDeque};
@@ -188,6 +188,8 @@ impl Path {
if dist < d {
dist_remaining = Some(dist);
}
+ } else {
+ dist_remaining = Some(dist);
}
}
@@ -227,6 +229,8 @@ impl Path {
if end_dist < d {
dist_remaining = Some(end_dist);
}
+ } else {
+ dist_remaining = Some(end_dist);
}
}
@@ -236,12 +240,6 @@ impl Path {
PathStep::ContraflowLane(l) => map.get_l(l).lane_center_pts.reversed().length(),
_ => Distance::ZERO,
};
- let use_this_step = if let Some(d) = dist_remaining {
- d - start_dist_this_step > EPSILON_DIST
- } else {
- true
- };
- if use_this_step {
if let Some((new_pts, dist)) =
self.steps[i].slice(map, start_dist_this_step, dist_remaining)
{
@@ -256,7 +254,6 @@ impl Path {
}
}
}
- }
Some(pts_so_far.unwrap())
}
