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

void ratio::setDenominator ( int  pdenominator = 1,
bool  reduce = true 

set denominator and reduce the ratio

Definition at line 116 of file ratio.cpp.

References m_denominator, and reduce().

Referenced by operator*(), operator+(), ratio(), setRatio(), TaskView::showResult(), ExercisePercentage::showResult(), and ExerciseConvert::showResult().

    /* denominator is not allowed to be 0 */
    if (!pdenominator)
        pdenominator = 1;

    m_denominator = pdenominator;

    // check, if we have to reduce the ratio
    if (reduce_it == true)


Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index