fn segments_intersect( a1: (f64, f64), a2: (f64, f64), b1: (f64, f64), b2: (f64, f64), ) -> bool
Check if two line segments intersect (for crossing count).