pub trait ParametricPath: Path {
// Required method
fn sample_t(&self, t: Self::Scalar) -> Result<Self::Point, Self::Error>;
// Provided methods
fn t_to_s(&self, t: Self::Scalar) -> Self::Scalar { ... }
fn s_to_t(&self, s: Self::Scalar) -> Self::Scalar { ... }
}Expand description
A curve that also supports sampling by a normalized parameter t ∈ [0, 1].
Extends Path with sample_t(t). Default implementations of t_to_s and
s_to_t use linear conversion (s = t * length), which is exact only for
arc-length-parameterized paths. Implementers may override these for exact
conversions.