Skip to main content

straighten_route

Function straighten_route 

Source
pub fn straighten_route(
    stored: &[Waypoint],
    geometry: &mut RouteGeometry,
    ends: Endpoints,
    rules: LegRules<'_>,
) -> Option<Vec<Waypoint>>
Expand description

Reconstruct a wire without a lattice: the corner list its geometry implies, or None — with nothing written — when a leg needs reconstruct_route: one that is non-colinear, or hugs a block, or (under the rider’s rules) runs through one.