Fixed of wrong distance function usage
This commit is contained in:
parent
e93585f9a7
commit
b6a78cc810
|
@ -22,7 +22,7 @@ namespace road {
|
|||
|
||||
Optional<Waypoint> Map::GetWaypoint(const geom::Location &loc) const {
|
||||
Waypoint w = Waypoint(shared_from_this(), loc);
|
||||
auto d = geom::Math::DistanceSquared2D(w.GetTransform().location, loc);
|
||||
auto d = geom::Math::Distance2D(w.GetTransform().location, loc);
|
||||
const RoadInfoLane *inf = _data.GetRoad(w._road_id)->GetInfo<RoadInfoLane>(w._dist);
|
||||
|
||||
if (d < inf->getLane(w._lane_id)->_width * 0.5) {
|
||||
|
|
Loading…
Reference in New Issue