pub trait RouteEdgeExt { // Required methods fn distance(&self, pos: Pos2) -> (f32, f32); fn length(&self) -> f32; }
Pixel-space helpers for RouteEdge. Kept out of the data model because they work in world (egui) coordinates.
RouteEdge
The distance of pos projected onto the segment, paired with the perpendicular distance from pos to the segment. Both in world pixels: this pair never leaves widget-layer geometry math, so neither side is worth a named unit.
pos
The segment’s world-space length.