Curve

Trait Curve 

Source
pub trait Curve {
    // Required method
    fn y(&self, p: f32) -> f32;
}
Expand description

§The Curve Parabola Interface.

A curve that has an axis of symmetry parallel to the y-axis.

Required Methods§

Source

fn y(&self, p: f32) -> f32

Computes the y-axis of the curve from a progress value.

§params.
pThe progress.
§returns.

f32 — The progress of the y-axis value.

§examples.
use eazy::Curve;

struct Linear;
  
impl Curve for Linear {
  fn y(&self, p: f32) -> f32 {
    -f32::INFINITY
  }
}
  
assert_eq!(Linear.y(0.0), -f32::INFINITY);

Implementations on Foreign Types§

Source§

impl<T: Curve + ?Sized> Curve for &T

Blanket impl for references, enabling &dyn Curve to work with ease().

Source§

fn y(&self, p: f32) -> f32

Implementors§

Source§

impl Curve for Interpolation

Source§

impl Curve for Bezier

Source§

impl Curve for Easing

Source§

impl Curve for InPiecewizePolynomial

Source§

impl Curve for OutPiecewizePolynomial

Source§

impl Curve for InPiecewizeQuadratic

Source§

impl Curve for OutPiecewizeQuadratic

Source§

impl Curve for eazy_data::interpolation::polynomial::none::None

Source§

impl Curve for InvQuartic

Source§

impl Curve for Quartic

Source§

impl Curve for InOutSmoother

Source§

impl Curve for InSmoother

Source§

impl Curve for OutSmoother

Source§

impl Curve for InOutSmooth

Source§

impl Curve for InSmooth

Source§

impl Curve for OutSmooth

Source§

impl Curve for InRationalCubic

Source§

impl Curve for OutRationalCubic

Source§

impl Curve for InRationalQuadratic

Source§

impl Curve for OutRationalQuadratic

Source§

impl Curve for InvSinusoidal

Source§

impl Curve for Sinusoidal

Source§

impl Curve for InBack

Source§

impl Curve for InOutBack

Source§

impl Curve for OutBack

Source§

impl Curve for CubicBezier

Source§

impl Curve for InExpo2

Source§

impl Curve for InOutExpo2

Source§

impl Curve for OutExpo2

Source§

impl Curve for InExpoE

Source§

impl Curve for InOutExpoE

Source§

impl Curve for OutExpoE

Source§

impl Curve for InLog10

Source§

impl Curve for InOutLog10

Source§

impl Curve for OutLog10

Source§

impl Curve for InBounce

Source§

impl Curve for InOutBounce

Source§

impl Curve for OutBounce

Source§

impl Curve for InElastic

Source§

impl Curve for InOutElastic

Source§

impl Curve for OutElastic

Source§

impl Curve for Spring

Source§

impl Curve for SpringConfigurable

Source§

impl Curve for InCubic

Source§

impl Curve for InOutCubic

Source§

impl Curve for OutCubic

Source§

impl Curve for InDecic

Source§

impl Curve for InOutDecic

Source§

impl Curve for OutDecic

Source§

impl Curve for InHectic

Source§

impl Curve for InOutHectic

Source§

impl Curve for OutHectic

Source§

impl Curve for Linear

Source§

impl Curve for eazy_data::easing::polynomial::none::None

Source§

impl Curve for InNonic

Source§

impl Curve for InOutNonic

Source§

impl Curve for OutNonic

Source§

impl Curve for InOctic

Source§

impl Curve for InOutOctic

Source§

impl Curve for OutOctic

Source§

impl Curve for InOutQuadratic

Source§

impl Curve for InQuadratic

Source§

impl Curve for OutQuadratic

Source§

impl Curve for InOutQuartic

Source§

impl Curve for InQuartic

Source§

impl Curve for OutQuartic

Source§

impl Curve for InOutQuintic

Source§

impl Curve for InQuintic

Source§

impl Curve for OutQuintic

Source§

impl Curve for InOutSeptic

Source§

impl Curve for InSeptic

Source§

impl Curve for OutSeptic

Source§

impl Curve for InOutSextic

Source§

impl Curve for InSextic

Source§

impl Curve for OutSextic

Source§

impl Curve for InOutSqrt

Source§

impl Curve for InSqrt

Source§

impl Curve for OutSqrt

Source§

impl Curve for InCircle

Source§

impl Curve for InOutCircle

Source§

impl Curve for OutCircle

Source§

impl Curve for InOutSine

Source§

impl Curve for InSine

Source§

impl Curve for OutSine