RealNumber

Trait RealNumber 

Source
pub trait RealNumber:
    Scalar
    + Precision
    + Invariant {
    const TWO: &'static Self;
    const THREE: &'static Self;
    const FIVE: &'static Self;
    const TEN: &'static Self;
    const NAN: &'static Option<Self> = _;
    const INF: &'static Option<Self> = _;
    const NEG_INF: &'static Option<Self> = _;

    // Provided methods
    fn is_nan(&self) -> bool { ... }
    fn is_inf(&self) -> bool { ... }
    fn is_neg_inf(&self) -> bool { ... }
    fn is_finite(&self) -> bool { ... }
}

Required Associated Constants§

Source

const TWO: &'static Self

Source

const THREE: &'static Self

Source

const FIVE: &'static Self

Source

const TEN: &'static Self

Provided Associated Constants§

Source

const NAN: &'static Option<Self> = _

Source

const INF: &'static Option<Self> = _

Source

const NEG_INF: &'static Option<Self> = _

Provided Methods§

Source

fn is_nan(&self) -> bool

Source

fn is_inf(&self) -> bool

Source

fn is_neg_inf(&self) -> bool

Source

fn is_finite(&self) -> bool

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

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

const NAN: &'static Option<Self>

Source§

const INF: &'static Option<Self>

Source§

const NEG_INF: &'static Option<Self>

Source§

fn is_nan(&self) -> bool

Source§

fn is_inf(&self) -> bool

Source§

fn is_neg_inf(&self) -> bool

Source§

impl RealNumber for f64

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

const NAN: &'static Option<Self>

Source§

const INF: &'static Option<Self>

Source§

const NEG_INF: &'static Option<Self>

Source§

fn is_nan(&self) -> bool

Source§

fn is_inf(&self) -> bool

Source§

fn is_neg_inf(&self) -> bool

Source§

impl RealNumber for i8

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for i16

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for i32

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for i64

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for i128

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for isize

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for u8

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for u16

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for u32

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for u64

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for u128

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Source§

impl RealNumber for usize

Source§

const TWO: &'static Self

Source§

const THREE: &'static Self

Source§

const FIVE: &'static Self

Source§

const TEN: &'static Self

Implementors§