pub fn contour_length(points: &[[f64; 2]], closed: bool) -> f64
The length of a polyline: the sum of its segment lengths. A closed one also counts the segment from its last point back to its first.