PolySplit

Trait PolySplit 

Source
pub trait PolySplit<D>
where Self: Copy, D: Copy + PartialOrd + Add<Output = D>,
{ // Required methods fn distance_to_point(&self, point: &Self) -> D; fn distance_to_segment( &self, segment: (&Self, &Self), ) -> DistanceToSegmentResult<Self, D>; }
Expand description

PolySplit defines methods for types that can be used in polyline_split method.

Required Methods§

Source

fn distance_to_point(&self, point: &Self) -> D

Returns distance to another point.

§Arguments
  • point - A point distance to should be calculated
Source

fn distance_to_segment( &self, segment: (&Self, &Self), ) -> DistanceToSegmentResult<Self, D>

Returns projection results to the segment.

§Arguments
  • segment - A segment presented by a tuple of points

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§