Logo Search packages:      
Sourcecode: kbruch version File versions  Download package

ratio ratio::operator/ ( ratio  divisor )

operator overloading for: c = object / divisor

Definition at line 214 of file ratio.cpp.

References operator*(), and reziproc().

{
    /* this object will be returned as the quotient */
    ratio quotient (0, 1);

    /* exchange numerator and denominator so we can handle as multiplication */
    divisor.reziproc();
    quotient = operator* (divisor);

    /* go back to the original state */
    divisor.reziproc();

    return quotient;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index