pub trait Smoothable: Default + Clone + Copy {
    type Atomic: Default;

    // Required methods
    fn to_f32(self) -> f32;
    fn from_f32(value: f32) -> Self;
    fn atomic_new(value: Self) -> Self::Atomic;
    fn atomic_load(this: &Self::Atomic) -> Self;
    fn atomic_store(this: &Self::Atomic, value: Self);
}
Expand description

A type that can be smoothed. This exists just to avoid duplicate explicit implementations for the smoothers.

Required Associated Types§

source

type Atomic: Default

The atomic representation of Self.

Required Methods§

source

fn to_f32(self) -> f32

source

fn from_f32(value: f32) -> Self

source

fn atomic_new(value: Self) -> Self::Atomic

source

fn atomic_load(this: &Self::Atomic) -> Self

A relaxed atomic load.

source

fn atomic_store(this: &Self::Atomic, value: Self)

A relaxed atomic store.

Implementations on Foreign Types§

source§

impl Smoothable for f32

§

type Atomic = AtomicF32

source§

fn to_f32(self) -> f32

source§

fn from_f32(value: f32) -> Self

source§

fn atomic_new(value: Self) -> Self::Atomic

source§

fn atomic_load(this: &Self::Atomic) -> Self

source§

fn atomic_store(this: &Self::Atomic, value: Self)

source§

impl Smoothable for i32

§

type Atomic = AtomicI32

source§

fn to_f32(self) -> f32

source§

fn from_f32(value: f32) -> Self

source§

fn atomic_new(value: Self) -> Self::Atomic

source§

fn atomic_load(this: &Self::Atomic) -> Self

source§

fn atomic_store(this: &Self::Atomic, value: Self)

Implementors§