Expand description
closest_points(&a, &b) -> (Point, Point) — nearest-point pair.
Mirrors boost::geometry::closest_points(g1, g2, segment_out) from
boost/geometry/algorithms/closest_points.hpp. Boost returns the
closest pair as a Segment; the Rust port returns a (Point, Point)
tuple — same information, no Segment::new boilerplate at the call
site. The first returned point lies on a, the second on b.
v1 ships the Cartesian pairs the Boost test fixtures cover:
point↔point, point↔segment, segment↔segment, and
linestring↔linestring. The areal (polygon) pairs depend on overlay
machinery and land in phase_03.
Functions§
- closest_
points - Return the pair of nearest points on
(a, b)—(pa, pb)wherepalies ona,pbonb, and|pa − pb|is minimal.