Skip to main content

TranslationInterpolate

Trait TranslationInterpolate 

Source
pub trait TranslationInterpolate<S> {
    // Required method
    fn translation_interpolate(&self, other: &Self, amount: S) -> Self;
}
Expand description

Trait used for interpolation of translation only in transforms

Required Methods§

Source

fn translation_interpolate(&self, other: &Self, amount: S) -> Self

Interpolate between self and other, using amount to calculate how much of other to use.

§Parameters:
  • amount: amount in the range 0. .. 1.
  • other: the other value to interpolate with
§Returns

A new value approximately equal to self * (1. - amount) + other * amount.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<V, R> TranslationInterpolate<<V as VectorSpace>::Scalar> for Decomposed<V, R>

Source§

fn translation_interpolate(&self, other: &Self, amount: V::Scalar) -> Self

Implementors§