Skip to main content

Real

Trait Real 

Source
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§

Source

fn lit(x: f64) -> Self

Rounds an f64 literal to this precision.

Source

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§

Source§

impl Real for f32

Source§

fn lit(x: f64) -> Self

Source§

fn to_f64_lossless(self) -> f64

Source§

impl Real for f64

Source§

fn lit(x: f64) -> Self

Source§

fn to_f64_lossless(self) -> f64

Implementors§