FloatingNumber

Trait FloatingNumber 

Source
pub trait FloatingNumber:
    RealNumber
    + NumberField
    + Signed {
    const PI: &'static Self;
    const E: &'static Self;

    // Required methods
    fn floor(&self) -> Self;
    fn ceil(&self) -> Self;
    fn round(&self) -> Self;
    fn trunc(&self) -> Self;
    fn fract(&self) -> Self;
}

Required Associated Constants§

Source

const PI: &'static Self

Source

const E: &'static Self

Required Methods§

Source

fn floor(&self) -> Self

Source

fn ceil(&self) -> Self

Source

fn round(&self) -> Self

Source

fn trunc(&self) -> Self

Source

fn fract(&self) -> 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 FloatingNumber for f32

Source§

const PI: &'static Self

Source§

const E: &'static Self

Source§

fn floor(&self) -> Self

Source§

fn ceil(&self) -> Self

Source§

fn round(&self) -> Self

Source§

fn trunc(&self) -> Self

Source§

fn fract(&self) -> Self

Source§

impl FloatingNumber for f64

Source§

const PI: &'static Self

Source§

const E: &'static Self

Source§

fn floor(&self) -> Self

Source§

fn ceil(&self) -> Self

Source§

fn round(&self) -> Self

Source§

fn trunc(&self) -> Self

Source§

fn fract(&self) -> Self

Implementors§