Skip to main content

segment_end

Function segment_end 

Source
pub fn segment_end<S: Segment>(s: &S) -> S::Point
where S::Point: Default + PointMut,
Expand description

Materialise the end endpoint of a segment as a Point value.

Mirrors reading s.second on model::segment (boost/geometry/geometries/segment.hpp:160-168). The point is built via Default::default and one set::<D> call per dimension, with each value sourced from s.get_indexed::<1, D>().

§Examples

use geometry_trait::{segment_end, PointMut, Segment};
fn _ex<S: Segment>(s: &S) where S::Point: Default + PointMut { let _ = segment_end(s); }