Skip to main content

make_segment

Function make_segment 

Source
pub fn make_segment<P>(
    start_coords: &[P::Scalar],
    end_coords: &[P::Scalar],
) -> Segment<P>
where P: PointMut + Default,
Expand description

Construct a Segment from two endpoint coordinate slices.

Mirrors boost::geometry::make<Segment>(...) from boost/geometry/algorithms/make.hpp.

§Panics

Panics if either slice is shorter than P::DIM (see make_point).