pub trait Float:
Clone
+ Copy
+ PartialOrd
+ Debug
+ Add<Output = Self>
+ Mul<Output = Self> {
// Required methods
fn zero() -> Self;
fn sqrt(val: Self) -> Self;
fn from_usize(n: usize) -> Self;
fn to_f64(self) -> f64;
fn from_f64(val: f64) -> Self;
fn max(self, other: Self) -> Self;
}Expand description
Minimal floating-point trait for generic drift tracking.
This trait provides the operations needed by BoundedDrift on the
floating-point type F. Implementations are provided for f32 and f64.
Required Methods§
Sourcefn from_usize(n: usize) -> Self
fn from_usize(n: usize) -> Self
Convert from usize.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".