pub fn new(dividend: u64, divisor: u64, positive: bool) -> Quotient {
        assert!(0 != divisor);

        let gcd = gcd(dividend, divisor);

        let (numerator, denominator) = match gcd {
            0 => (0, 1),
            _ => (dividend / gcd, divisor / gcd)
        };

        Quotient {
            numerator: numerator,
            denominator: denominator,
            positive: match numerator { 0 => true, _ => positive }
        }
    }
/// Constructs a new quotient, given a dividend, divisor and sign.
///
/// # Panics
///
/// Will panic if divisor == 0.
///
Constructs a new quotient, given a dividend, divisor and sign.
Constructs a new quotient given a dividend divisor and sign .
pub fn new(dividend: u64, divisor: u64, positive: bool) -> Quotient {
        assert!(0 != divisor);
        let gcd = gcd(dividend, divisor);
        let (numerator, denominator) = match gcd {
            0 => (0, 1),
            _ => (dividend / gcd, divisor / gcd)
        };
        Quotient {
            numerator: numerator,
            denominator: denominator,
            positive: match numerator { 0 => true, _ => positive }
        }
    }
pub fn new ( dividend : u64 , divisor : u64 , positive : bool ) -> Quotient { assert ! ( 0 divisor ) ; let gcd = gcd ( dividend , divisor ) ; let ( numerator , denominator ) = match gcd { 0 => ( 0 , 1 ) , _ => ( dividend / gcd , divisor / gcd ) } ; Quotient { numerator : numerator , denominator : denominator , positive : match numerator { 0 => true , _ => positive } } }
Constructs a new quotient, given a dividend, divisor and sign.
Constructs a new quotient given a dividend divisor and sign .
dividend
u64
divisor
u64
positive
bool
panics
Will panic if divisor == 0.
Will panic if divisor == 0 .