pub trait Signum {
// Required methods
const fn signum(self) -> Self;
const fn signum_i128(self) -> i128;
}
Expand description
✅ The sign of the number.
Returns:
1.0
if positive,0.0
if zero,-1.0
if negative.
§Panics
This function never panics.
Required Methods§
const fn signum(self) -> Self
const fn signum_i128(self) -> i128
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.