Skip to main content

n_samples

Function n_samples 

Source
pub fn n_samples<P: Path>(
    path: &P,
    n: usize,
) -> impl Iterator<Item = Result<P::Point, P::Error>> + '_
Expand description

Sample a path at n evenly-spaced arc-length positions.

The samples are at s = 0, length/(n-1), 2*length/(n-1), …, length. For n == 1, returns a single sample at s = 0.