[][src]Trait kurbo::ParamCurveNearest

pub trait ParamCurveNearest {
    fn nearest(&self, p: Point, accuracy: f64) -> (f64, f64);
}

A parametrized curve that reports the nearest point.

Required methods

fn nearest(&self, p: Point, accuracy: f64) -> (f64, f64)

Find the point on the curve nearest the given point.

Returns the parameter and the square of the distance.

Loading content...

Implementors

impl ParamCurveNearest for PathSeg[src]

impl ParamCurveNearest for CubicBez[src]

fn nearest(&self, p: Point, accuracy: f64) -> (f64, f64)[src]

Find nearest point, using subdivision.

impl ParamCurveNearest for Line[src]

impl ParamCurveNearest for QuadBez[src]

fn nearest(&self, p: Point, _accuracy: f64) -> (f64, f64)[src]

Find nearest point, using analytical algorithm based on cubic root finding.

Loading content...