pub trait SignedExt: Signed {
// Provided methods
fn sign(self) -> Sign { ... }
fn signum_or_zero(self) -> Self
where Self: Zero { ... }
}Expand description
Function returning number representing sign of self
Provided Methods§
fn sign(self) -> Sign
Sourcefn signum_or_zero(self) -> Selfwhere
Self: Zero,
fn signum_or_zero(self) -> Selfwhere
Self: Zero,
Maps 0.0 to 0.0, otherwise equal to S::signum (which would otherwise
map +0.0 -> 1.0 and -0.0 -> -1.0)
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.