Trait Float

Source
pub trait Float:
    Float
    + FloatConst
    + Add<Output = Self>
    + Div<Output = Self>
    + Mul<Output = Self>
    + Neg<Output = Self>
    + Sub<Output = Self>
    + Debug
    + Default
    + Copy
    + Clone
    + Sized {
    // Provided method
    fn lerp(self, rhs: Self, t: Self) -> Self { ... }
}
Expand description

Floating point component type

Provided Methods§

Source

fn lerp(self, rhs: Self, t: Self) -> Self

Calculate linear interpolation of two values

The t value should be between 0 and 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.

Implementations on Foreign Types§

Source§

impl Float for f32

Source§

impl Float for f64

Implementors§