Function truck_modeling::base::algo::curve::presearch[][src]

pub fn presearch<C>(
    curve: &C,
    point: <C as ParametricCurve>::Point,
    range: (f64, f64),
    division: usize
) -> f64 where
    C: ParametricCurve,
    <C as ParametricCurve>::Point: MetricSpace,
    <C as ParametricCurve>::Point: Copy,
    <<C as ParametricCurve>::Point as MetricSpace>::Metric == f64
Expand description

Divides the domain into equal parts, examines all the values, and returns t such that curve.subs(t) is closest to point. This method is useful to get an efficient hint of search_nearest_parameter.