Interpolate

Trait Interpolate 

Source
pub trait Interpolate:
    Copy
    + Debug
    + Default
    + 'static {
    // Required methods
    fn to_f64(self) -> f64;
    fn from_f64(val: f64) -> Self;
}
Expand description

Trait for numeric types that can be interpolated

Required Methods§

Source

fn to_f64(self) -> f64

Convert to f64 for intermediate calculations

Source

fn from_f64(val: f64) -> Self

Create from f64 after interpolation calculations

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 Interpolate for f32

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(val: f64) -> Self

Source§

impl Interpolate for f64

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(val: f64) -> Self

Source§

impl Interpolate for i32

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(val: f64) -> Self

Source§

impl Interpolate for i64

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(val: f64) -> Self

Source§

impl Interpolate for u32

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(val: f64) -> Self

Source§

impl Interpolate for u64

Source§

fn to_f64(self) -> f64

Source§

fn from_f64(val: f64) -> Self

Implementors§