pub fn corners_of(points: &[GridPoint]) -> Vec<GridPoint>Expand description
Reduce a polyline to its corners: drop adjacent duplicate points and any point collinear with its neighbours (a redundant interior point on a straight run). Keeps the first and last points and only the true direction-change vertices — the canonical corner set the model stores as waypoints. Idempotent.