pub trait Ease: Sized {
// Required method
fn interpolating_curve_unbounded(start: Self, end: Self) -> impl Curve<Self>;
}
Available on crate feature
curve
only.Expand description
A type whose values can be eased between.
This requires the construction of an interpolation curve that actually extends beyond the curve segment that connects two values, because an easing curve may extrapolate before the starting value and after the ending value. This is especially common in easing functions that mimic elastic or springlike behavior.
Required Methods§
Sourcefn interpolating_curve_unbounded(start: Self, end: Self) -> impl Curve<Self>
fn interpolating_curve_unbounded(start: Self, end: Self) -> impl Curve<Self>
Given start
and end
values, produce a curve with unlimited domain
that:
- takes a value equivalent to
start
att = 0
- takes a value equivalent to
end
att = 1
- has constant speed everywhere, including outside of
[0, 1]
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.