pub fn densify<G>(
g: &G,
max_distance: f64,
) -> <CartesianDensify as DensifyStrategy<G>>::Outputwhere
CartesianDensify: DensifyStrategy<G>,Expand description
Insert evenly-spaced intermediate vertices into g so that no
output segment is longer than max_distance.
Mirrors boost::geometry::densify from
boost/geometry/algorithms/densify.hpp. Straight-line
interpolation only splits an edge — it never adds length — so the
total length of the output equals that of the input.
§Panics
Panics if max_distance is not strictly positive (zero, negative,
or NaN) — Boost throws geometry::invalid_input_exception for
max_distance <= 0 (algorithms/densify.hpp); the Rust port
panics with a clear message.