Trait Float

Source
pub trait Float:
    NdFloat
    + FloatConst
    + Signed
    + Float
    + ValueFrom<usize>
    + ApproxInto<usize, RoundToZero>
    + ApproxFrom<u64> {
    // Required methods
    fn half() -> Self;
    fn ten() -> Self;
}
Expand description

Float number trait, it is implemented for f32 and f64 only

Required Methods§

Source

fn half() -> Self

Source

fn ten() -> Self

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§

fn half() -> Self

Source§

fn ten() -> Self

Source§

impl Float for f64

Source§

fn half() -> Self

Source§

fn ten() -> Self

Implementors§