Trait envelope::Point
[−]
[src]
pub trait Point: Clone { type X: PartialEq + Clone; type Y: PartialEq + Spatial; fn x_to_scalar(x: Self::X) -> <Self::Y as Spatial>::Scalar; fn x(&self) -> Self::X; fn y(&self) -> Self::Y; fn interpolate(x: Self::X, start: &Self, end: &Self) -> Self::Y
where
<Self::Y as Spatial>::Scalar: Scalar, { ... } }
Implement this for types to be used as points on an Envelope.
Associated Types
Required Methods
fn x_to_scalar(x: Self::X) -> <Self::Y as Spatial>::Scalar
Convert X to Y's Scalar.
fn x(&self) -> Self::X
X (often associated with time).
fn y(&self) -> Self::Y
Y (often associated with some value).
Provided Methods
fn interpolate(x: Self::X, start: &Self, end: &Self) -> Self::Y where
<Self::Y as Spatial>::Scalar: Scalar,
<Self::Y as Spatial>::Scalar: Scalar,
Interpolate between two points and return y for the given x.