Trait F32Extensions

Source
pub trait F32Extensions {
    // Required methods
    fn signum_zero(self) -> Self;
    fn spread(self, amount: f32) -> Self;
    fn spread_in(self, amount: f32) -> Self;
    fn spread_zero(self, amount: f32) -> Self;
    fn clamp_scale(self, from: Range<f32>, to: Range<f32>) -> f32;
}

Required Methods§

Source

fn signum_zero(self) -> Self

Source

fn spread(self, amount: f32) -> Self

Source

fn spread_in(self, amount: f32) -> Self

Source

fn spread_zero(self, amount: f32) -> Self

Source

fn clamp_scale(self, from: Range<f32>, to: Range<f32>) -> f32

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

Source§

fn spread(self, amount: f32) -> Self

0.2 => 0.9..1.1

Source§

fn spread_in(self, amount: f32) -> Self

0.2 => 0.8..1.0

Source§

fn signum_zero(self) -> Self

Source§

fn spread_zero(self, amount: f32) -> Self

Source§

fn clamp_scale(self, from: Range<f32>, to: Range<f32>) -> f32

Implementors§