pub trait SmoothInterp: Interp {
// Required methods
fn smooth_damp(
&mut self,
velocity: &mut Self,
target: Self,
smooth_time: Self::Factor,
max_speed: Self::Factor,
delta_time: Self::Factor,
);
fn smooth_lerp(
self,
target: Self,
t: Self::Factor,
dt: Self::Factor,
) -> Self;
}Expand description
A type that can smooth damp towards a target.
Required Methods§
Sourcefn smooth_damp(
&mut self,
velocity: &mut Self,
target: Self,
smooth_time: Self::Factor,
max_speed: Self::Factor,
delta_time: Self::Factor,
)
fn smooth_damp( &mut self, velocity: &mut Self, target: Self, smooth_time: Self::Factor, max_speed: Self::Factor, delta_time: Self::Factor, )
Accelerate towards a target with stateful velocity.
Sourcefn smooth_lerp(self, target: Self, t: Self::Factor, dt: Self::Factor) -> Self
fn smooth_lerp(self, target: Self, t: Self::Factor, dt: Self::Factor) -> Self
Lerp towards a target with a framerate-invariant version.
See: Lerp Smoothing is Broken.
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.