Some spacing tweaks to predicates

This commit is contained in:
Eryn Wells 2018-08-20 16:31:10 -07:00
parent a81e9b4258
commit 234b60dde9

View file

@ -20,12 +20,16 @@ pub trait IsChar {
pub trait IsNumber {
/// Is this thing a number?
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.
fn is_complex(&self) -> bool { self.is_real() }
/// Should return `true` if this Value is a real number type.
fn is_real(&self) -> bool { self.is_rational() }
/// Should return `true` if this Value is a rational number type.
fn is_rational(&self) -> bool { self.is_integer() }
/// Should return `true` if this Value is a integer number type.
fn is_integer(&self) -> bool { false }
}