pub trait Float:
Sized
+ Float
+ Lapack
+ ScalarOperand {
// Required methods
fn half() -> Self;
fn two() -> Self;
fn total_cmp(&self, other: &Self) -> Ordering;
// Provided method
fn sign(self) -> Self { ... }
}Required Methods§
Provided Methods§
Sourcefn sign(self) -> Self
fn sign(self) -> Self
A more conventional sign function, because the built-in signum treats signed zeros as positive and negative: https://github.com/rust-lang/rust/issues/57543
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.