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