Skip to main content

Real

Trait Real 

pub trait Real:
    Float
    + FloatConst
    + NumAssign
    + Send
    + Sync
    + Debug
    + 'static {
    // Required methods
    fn lit(x: f64) -> Self;
    fn to_f64_lossless(self) -> f64;
}
Expand description

Floating-point scalar accepted by the kernel (f32 or f64).

Required Methods§

fn lit(x: f64) -> Self

Rounds an f64 literal to this precision.

fn to_f64_lossless(self) -> f64

Widens this value to f64.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl Real for f32

§

fn lit(x: f64) -> f32

§

fn to_f64_lossless(self) -> f64

§

impl Real for f64

§

fn lit(x: f64) -> f64

§

fn to_f64_lossless(self) -> f64

Implementors§