Skip to main content

Float

Trait Float 

Source
pub trait Float:
    Primitive
    + Float
    + NumHash
    + NumOrd<Self> {
    const THREE: Self;
    const FOUR: Self;
    const FIVE: Self;
    const SIX: Self;
    const EPS: Self;
    const NAN: Self;

    // Provided method
    fn safe_clamp(self, min: Self, max: Self) -> Self { ... }
}

Required Associated Constants§

Source

const THREE: Self

Source

const FOUR: Self

Source

const FIVE: Self

Source

const SIX: Self

Source

const EPS: Self

Source

const NAN: Self

Provided Methods§

Source

fn safe_clamp(self, min: Self, max: Self) -> Self

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

Source§

const THREE: Self = 3.0

Source§

const FOUR: Self = 4.0

Source§

const FIVE: Self = 5.0

Source§

const SIX: Self = 6.0

Source§

const NAN: Self = f32::NAN

Source§

const EPS: Self = 1e-6_f32

Source§

impl Float for f64

Source§

const THREE: Self = 3.0

Source§

const FOUR: Self = 4.0

Source§

const FIVE: Self = 5.0

Source§

const SIX: Self = 6.0

Source§

const NAN: Self = f64::NAN

Source§

const EPS: Self = 1e-12_f64

Implementors§