Skip to main content

nearest_gap

Function nearest_gap 

pub fn nearest_gap(gaps: &[Gap], px: f64, py: f64) -> Option<&Gap>
Expand description

Find the gap nearest a click point (px, py) (content-local). Picks the row whose vertical band contains py if any, else the globally nearest gap by Euclidean distance to the gap’s vertical extent.