Some spacing tweaks to predicates
This commit is contained in:
parent
a81e9b4258
commit
234b60dde9
1 changed files with 4 additions and 0 deletions
|
@ -20,12 +20,16 @@ pub trait IsChar {
|
||||||
pub trait IsNumber {
|
pub trait IsNumber {
|
||||||
/// Is this thing a number?
|
/// Is this thing a number?
|
||||||
fn is_number(&self) -> bool { self.is_complex() || self.is_real() || self.is_rational() || self.is_integer() }
|
fn is_number(&self) -> bool { self.is_complex() || self.is_real() || self.is_rational() || self.is_integer() }
|
||||||
|
|
||||||
/// Should return `true` if this Value is a complex number type.
|
/// Should return `true` if this Value is a complex number type.
|
||||||
fn is_complex(&self) -> bool { self.is_real() }
|
fn is_complex(&self) -> bool { self.is_real() }
|
||||||
|
|
||||||
/// Should return `true` if this Value is a real number type.
|
/// Should return `true` if this Value is a real number type.
|
||||||
fn is_real(&self) -> bool { self.is_rational() }
|
fn is_real(&self) -> bool { self.is_rational() }
|
||||||
|
|
||||||
/// Should return `true` if this Value is a rational number type.
|
/// Should return `true` if this Value is a rational number type.
|
||||||
fn is_rational(&self) -> bool { self.is_integer() }
|
fn is_rational(&self) -> bool { self.is_integer() }
|
||||||
|
|
||||||
/// Should return `true` if this Value is a integer number type.
|
/// Should return `true` if this Value is a integer number type.
|
||||||
fn is_integer(&self) -> bool { false }
|
fn is_integer(&self) -> bool { false }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue