pub fn recip(self) -> Self {
        if self.numerator == 0 {
            panic!("Cannot compute reciprocal of {:?}", self)
        }
        unsafe { Self::new_unchecked(self.minus, self.denominator, self.numerator) }
    }
/// Takes the reciprocal (inverse) of a number.
///
/// # Examples
///
/// ```
/// use lib_rust::math::rational::Rational;
///
/// let num: Rational = (-2, 3).into();
///
/// assert_eq!(num.recip(), -3.0 / 2.0);
/// ```
///
/// # Panics
///
/// This function will panic if `self == 0`.
Takes the reciprocal (inverse) of a number.
Takes the reciprocal ( inverse ) of a number .
pub fn recip(self) -> Self {
        if self.numerator == 0 {
            panic!("Cannot compute reciprocal of {:?}", self)
        }
        unsafe { Self::new_unchecked(self.minus, self.denominator, self.numerator) }
    }
pub fn recip ( self ) -> Self { if self . numerator == 0 { panic ! ( " " self ) } unsafe { Self :: new_unchecked ( self . minus , self . denominator , self . numerator ) } }
Takes the reciprocal (inverse) of a number.
Takes the reciprocal ( inverse ) of a number .
self
self
examples
```
use lib_rust::math::rational::Rational.




` ` ` use lib_rust :: math :: rational :: Rational .
panics
This function will panic if `self == 0`.
This function will panic if ` self == 0 ` .