GUIDOLib
1.7.7
Guido Engine Internal Documentation
|
Numerator and denominator. More...
Public Member Functions | |
Fraction () | |
Fraction (int theNumerator, int theDenominator) | |
Fraction (double x) | |
Fraction (int value) | |
void | print (std::ostream &) const |
int | getNumerator () const |
int | getDenominator () const |
void | normalize () |
void | set (long long num, long long denom=1) |
void | setDenominator (long long newDenominator) |
void | setNumerator (long long newNumerator) |
void | invert () |
int | isMultiple (int n) |
bool | isOdd () const |
bool | isEven () const |
void | add (const Fraction &tmp) |
Fraction | getBiggestFullNote (int exp) const |
Fraction | getReallySmallerNote (int exp) const |
operator double () const | |
operator float () const | |
operator std::string () const | |
operator bool () const | |
bool | operator> (const Fraction &in) const |
bool | operator== (const Fraction &in) const |
bool | operator!= (const Fraction &in) const |
bool | operator< (const Fraction &in) const |
bool | operator>= (const Fraction &in) const |
bool | operator<= (const Fraction &in) const |
Fraction & | operator+= (const Fraction &tmp) |
Fraction & | operator-= (const Fraction &tmp) |
Fraction & | operator%= (const Fraction &tmp) |
Fraction & | operator*= (const Fraction &tmp) |
Fraction & | operator*= (const int tmp) |
Static Public Member Functions | |
static long long | gcd (long long i1, long long i2) |
static long long | scm (long long i1, long long i2) |
Numerator and denominator.
|
inline |
Fraction::Fraction | ( | int | theNumerator, |
int | theDenominator | ||
) |
Fraction::Fraction | ( | double | x | ) |
|
inline |
void Fraction::add | ( | const Fraction & | tmp | ) |
|
static |
Fraction Fraction::getBiggestFullNote | ( | int | exp | ) | const |
|
inline |
|
inline |
Fraction Fraction::getReallySmallerNote | ( | int | exp | ) | const |
void Fraction::invert | ( | ) |
bool Fraction::isEven | ( | ) | const |
int Fraction::isMultiple | ( | int | n | ) |
bool Fraction::isOdd | ( | ) | const |
void Fraction::normalize | ( | ) |
|
inline |
|
inline |
|
inline |
Fraction::operator std::string | ( | ) | const |
|
inline |
Fraction& Fraction::operator*= | ( | const int | tmp | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Fraction::print | ( | std::ostream & | ) | const |
|
static |
void Fraction::set | ( | long long | num, |
long long | denom = 1 |
||
) |
void Fraction::setDenominator | ( | long long | newDenominator | ) |
void Fraction::setNumerator | ( | long long | newNumerator | ) |