[][src]Trait nova_math::traits::Real

pub trait Real: Float + Add + AddAssign + Sub + SubAssign + Mul + MulAssign + Div + DivAssign + Copy + Clone + Pi + IntoDegrees + IntoRadians + PartialEq + PartialOrd + Debug + Display {
    fn is_f32() -> bool;
fn is_f64() -> bool;
fn float_type() -> FloatType;
fn as_f32(self) -> f32;
fn as_f64(self) -> f64; }

This type represents a real number. A macro trait that makes using generic floats much easier

Required methods

fn is_f32() -> bool

Is this type a single-precision floating point. Useful for identifying the underlying representation for SIMD purposes

fn is_f64() -> bool

Is this type a double-precision floating point. Useful for identifying the underlying representation for SIMD purposes

fn float_type() -> FloatType

Return the floating point type as an enum. Mostly just a convinience instead of using is_f32() or is_f64()

fn as_f32(self) -> f32

Force get this value as single-precision

fn as_f64(self) -> f64

Force get this value as double-precision

Loading content...

Implementations on Foreign Types

impl Real for f32[src]

impl Real for f64[src]

Loading content...

Implementors

Loading content...