/// Converts to an integer, rounding towards zero.
///
/// An integer that is too big to fit in an i64 returns `None`.
Converts to an integer, rounding towards zero.
An integer that is too big to fit in an i64 returns `None`.
Converts to an integer rounding towards zero . An integer that is too big to fit in an i64 returns ` None ` .
pub fn to_integer(&self) -> Option<i64> {
        match &self.value {
            NumValue::Rational(s) => Some(s.to_integer()),
            NumValue::BigRational(s) => i64::try_from(s.to_integer()).ok(),
            NumValue::Float(s) => Some(s.ceil() as i64),
        }
    }
pub fn to_integer ( & self ) -> Option < i64 > { match & self . value { NumValue :: Rational ( s ) => Some ( s . to_integer ( ) ) , NumValue :: BigRational ( s ) => i64 :: try_from ( s . to_integer ( ) ) . ok ( ) , NumValue :: Float ( s ) => Some ( s . ceil ( ) as i64 ) , } }
Converts to an integer, rounding towards zero.
Converts to an integer rounding towards zero .
&self