is_complex(), is_real(), and is_rational() are true if the lower type check is true
This commit is contained in:
parent
7965f4e971
commit
3571fd02c5
1 changed files with 3 additions and 3 deletions
|
@ -23,11 +23,11 @@ pub trait IsNumber {
|
||||||
/// Should return `true` if this Value is a number type.
|
/// Should return `true` if this Value is a number type.
|
||||||
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 { false }
|
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 { false }
|
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 { false }
|
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