Skip to main content

Interpolatable

Trait Interpolatable 

Source
pub trait Interpolatable:
    Clone
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<f32, Output = Self>
    + Mul<f64, Output = Self>
    + Div<f32, Output = Self>
    + Div<f64, Output = Self>
    + PartialEq
    + Send
    + Sync
    + 'static { }
Expand description

Marker trait for types that support time-based interpolation.

Types implementing this trait can be used with TimeDataMap for automatic interpolation between keyframes.

§Required Bounds

  • Clone – Values must be cloneable for interpolation.
  • Add, Sub – Vector arithmetic for blending.
  • Mul<f32>, Mul<f64> – Scalar multiplication for weighting.
  • Div<f32>, Div<f64> – Scalar division for normalization.
  • PartialEq – Equality comparison for optimization.
  • Send + Sync + 'static – Thread safety for parallel operations.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Interpolatable for T
where T: Clone + Add<Output = T> + Sub<Output = T> + Mul<f32, Output = T> + Mul<f64, Output = T> + Div<f32, Output = T> + Div<f64, Output = T> + PartialEq + Send + Sync + 'static,