pub fn new(numerator: i64, denominator: u64) -> Self {
        if denominator == 0 {
            panic!("denominator should never be 0")
        }
        let gcd = gcd(numerator.abs() as u64, denominator);
        let numerator = numerator / (gcd as i64);
        let denominator = denominator / gcd;

        Fraction(numerator, denominator)
    }
/// Creates a fraction.
///
/// The denominator should not be zero, panics otherwise.
Creates a fraction.
The denominator should not be zero, panics otherwise.
Creates a fraction . The denominator should not be zero panics otherwise .
pub fn new(numerator: i64, denominator: u64) -> Self {
        if denominator == 0 {
            panic!("denominator should never be 0")
        }
        let gcd = gcd(numerator.abs() as u64, denominator);
        let numerator = numerator / (gcd as i64);
        let denominator = denominator / gcd;
        Fraction(numerator, denominator)
    }
pub fn new ( numerator : i64 , denominator : u64 ) -> Self { if denominator == 0 { panic ! ( " " ) } let gcd = gcd ( numerator . abs ( ) as u64 , denominator ) ; let numerator = numerator / ( gcd as i64 ) ; let denominator = denominator / gcd ; Fraction ( numerator , denominator ) }
Creates a fraction.
Creates a fraction .
numerator
i64
denominator
u64
numerator
i64
denominator
u64