pub trait FloatSemantics: Copy {
// Required methods
fn needs_normalization(self) -> bool;
fn normalize(self) -> Self;
fn compare(self, other: Self) -> Ordering;
}Expand description
Required Methods§
Sourcefn needs_normalization(self) -> bool
fn needs_normalization(self) -> bool
Whether normalize_float would change this value. This is a cheap
check that lets callers skip rewriting data which is already
normalized.
Sourcefn normalize(self) -> Self
fn normalize(self) -> Self
See normalize_float.
Sourcefn compare(self, other: Self) -> Ordering
fn compare(self, other: Self) -> Ordering
See compare_floats.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".