1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use malachite_base::num::conversion::traits::IsInteger;
use natural::Natural;
impl<'a> IsInteger for &'a Natural {
/// Determines whether a [`Natural`] is an integer. It always returns `true`.
///
/// $f(x) = \textrm{true}$.
///
/// # Worst-case complexity
/// Constant time and additional memory.
///
/// # Examples
/// ```
/// extern crate malachite_base;
///
/// use malachite_base::num::basic::traits::{One, Zero};
/// use malachite_base::num::conversion::traits::IsInteger;
/// use malachite_nz::natural::Natural;
///
/// assert_eq!(Natural::ZERO.is_integer(), true);
/// assert_eq!(Natural::ONE.is_integer(), true);
/// assert_eq!(Natural::from(100u32).is_integer(), true);
/// ```
#[inline]
fn is_integer(self) -> bool {
true
}
}