Float

Trait Float 

Source
pub trait Float:
    Add<Self, Output = Self>
    + Div<Self, Output = Self>
    + Mul<Self, Output = Self>
    + Sub<Self, Output = Self>
    + Copy
    + FloatWrapper
    + PartialEq
    + Neg<Output = Self>
    + AddAssign
    + SubAssign
    + MulAssign
    + DivAssign {
    const _0: Self;
    const _1: Self;
    const _2: Self;

    // Required methods
    fn sqrt_(self) -> Self;
    fn powi_(self, p: i32) -> Self;
    fn hypot_(self, other: Self) -> Self;
    fn exp_(self) -> Self;
    fn sin_(self) -> Self;
    fn cos_(self) -> Self;
    fn is_nan_(self) -> bool;
    fn is_infinite_(self) -> bool;
}

Required Associated Constants§

Source

const _0: Self

Source

const _1: Self

Source

const _2: Self

Required Methods§

Source

fn sqrt_(self) -> Self

Source

fn powi_(self, p: i32) -> Self

Source

fn hypot_(self, other: Self) -> Self

Source

fn exp_(self) -> Self

Source

fn sin_(self) -> Self

Source

fn cos_(self) -> Self

Source

fn is_nan_(self) -> bool

Source

fn is_infinite_(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 Float for f32

Source§

const _0: f32 = 0f32

Source§

const _1: f32 = 1f32

Source§

const _2: f32 = 2f32

Source§

fn powi_(self, p: i32) -> Self

Source§

fn hypot_(self, other: Self) -> Self

Source§

fn sqrt_(self) -> Self

Source§

fn exp_(self) -> Self

Source§

fn sin_(self) -> Self

Source§

fn cos_(self) -> Self

Source§

fn is_nan_(self) -> bool

Source§

fn is_infinite_(self) -> bool

Source§

impl Float for f64

Source§

const _0: f64 = 0f64

Source§

const _1: f64 = 1f64

Source§

const _2: f64 = 2f64

Source§

fn powi_(self, p: i32) -> Self

Source§

fn hypot_(self, other: Self) -> Self

Source§

fn sqrt_(self) -> Self

Source§

fn exp_(self) -> Self

Source§

fn sin_(self) -> Self

Source§

fn cos_(self) -> Self

Source§

fn is_nan_(self) -> bool

Source§

fn is_infinite_(self) -> bool

Implementors§

Source§

impl Float for Fast<f32>

Source§

const _0: Self

Source§

const _1: Self

Source§

const _2: Self

Source§

impl Float for Fast<f64>

Source§

const _0: Self

Source§

const _1: Self

Source§

const _2: Self

Source§

impl<T: Float> Float for Complex<T>

Source§

const _0: Self

Source§

const _1: Self

Source§

const _2: Self