private ProgressLine GetClosestIntersectionPointProgressLine() { var before = allProgressLinesByMapNodeOffset[CurrentMapNode.Previous.Offset]; var current = allProgressLinesByMapNodeOffset[CurrentMapNode.Offset]; var after = allProgressLinesByMapNodeOffset[CurrentMapNode.Next.Offset]; var lines = before.Union(current).Union(after); return(lines .OrderBy(progressLine => DistanceHelper .FindClosestPointOnLine( Car.BoundingBox.Center, progressLine.Line) .GetDistanceTo(Car.BoundingBox.Center)) .First()); }