Fixed of wrong distance function usage

This commit is contained in:
Marc 2018-11-14 12:30:08 +01:00
parent e93585f9a7
commit b6a78cc810
1 changed files with 1 additions and 1 deletions

View File

@ -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) {