use is_one rather than comparison

This commit is contained in:
ConnorSkees 2020-04-30 16:36:10 -04:00
parent 6b257fbfe9
commit 7270890e45

View File

@ -55,7 +55,7 @@ impl Number {
}
pub fn is_decimal(&self) -> bool {
self.val.denom() != &BigInt::from(1)
!self.val.denom().is_one()
}
pub fn clamp<A: Into<Number> + Zero, B: Into<Number>>(self, min: A, max: B) -> Self {