pub trait IsNegative: Zero + Ord {
// Required method
fn is_negative(&self) -> bool;
}
Expand description
A simplified version of num_traits::Signed
.
Unlike Signed::is_negative
or f64::is_sign_negative
, this returns false
for -0.0
to keep
consistency among integers, decimals and floats.
Required Methods§
fn is_negative(&self) -> bool
Object Safety§
This trait is not object safe.