Trait core::num::SignedIntUnstable
[-]
[+]
[src]
pub trait SignedInt: Int + Neg<Self> {
fn abs(self) -> Self;
fn signum(self) -> Self;
fn is_positive(self) -> bool;
fn is_negative(self) -> bool;
}A built-in two's complement integer.
Required Methods
fn abs(self) -> Self
Computes the absolute value of self. Int::min_value() will be
returned if the number is Int::min_value().
fn signum(self) -> Self
Returns a number representing sign of self.
0if the number is zero1if the number is positive-1if the number is negative
fn is_positive(self) -> bool
Returns true if self is positive and false if the number
is zero or negative.
fn is_negative(self) -> bool
Returns true if self is negative and false if the number
is zero or positive.