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

ratio::ratio ( int  pnumerator = 0,
int  pdenominator = 1 
) [explicit]

constructor

Definition at line 32 of file ratio.cpp.

References m_denominator, and reduce().

Referenced by operator<(), and operator>().

                                              : m_numerator (pnumerator), m_denominator (pdenominator)
{
#ifdef DEBUG
    kDebug() << "constructor ratio";
#endif

    // denominator is never allowed to be 0
    if (!m_denominator)
        m_denominator = 1;

    // reduce the new ratio
    reduce();
}

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