Skip to main content

LinspaceNum

Trait LinspaceNum 

Source
pub trait LinspaceNum: Element + PartialOrd {
    // Required methods
    fn from_f64(v: f64) -> Self;
    fn to_f64(self) -> f64;
}
Expand description

Trait for float-like types used in linspace/logspace/geomspace.

Required Methods§

Source

fn from_f64(v: f64) -> Self

Convert from f64.

Source

fn to_f64(self) -> f64

Convert to f64.

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 LinspaceNum for f32

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl LinspaceNum for f64

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Implementors§