Skip to main content

Tangent

Trait Tangent 

Source
pub trait Tangent: Path {
    // Required method
    fn tangent_at(
        &self,
        s: Self::Scalar,
    ) -> Result<<Self::Point as Point>::Vector, Self::Error>;
}
Expand description

Query the unit tangent vector at any point along a path.

The returned vector is unit-length and points in the direction of increasing arc-length.

Required Methods§

Source

fn tangent_at( &self, s: Self::Scalar, ) -> Result<<Self::Point as Point>::Vector, Self::Error>

Unit tangent vector at arc-length s.

Returns an error when s is outside the domain or the path is not differentiable at s.

Implementors§