#include <TRational.h>
Public Member Functions | |
TRational (long int num=0, long int denom=1) | |
TRational (const TRational &d) | |
TRational (const string &str) | |
long int | getNumerator () const |
long int | getDenominator () const |
void | setNumerator (long int d) |
void | setDenominator (long int d) |
void | set (long int n, long int d) |
TRational | operator+ (const TRational &dur) const |
TRational | operator- (const TRational &dur) const |
TRational | operator * (const TRational &dur) const |
Useful for notes with dots. | |
TRational | operator/ (const TRational &dur) const |
TRational | operator * (int num) const |
TRational | operator/ (int num) const |
TRational & | operator+= (const TRational &dur) |
TRational & | operator-= (const TRational &dur) |
TRational & | operator *= (const TRational &dur) |
Useful for notes with dots. | |
TRational & | operator/= (const TRational &dur) |
TRational & | operator *= (long int num) |
TRational & | operator/= (long int num) |
TRational & | operator= (const TRational &dur) |
bool | operator> (const TRational &dur) const |
bool | operator>= (const TRational &dur) const |
bool | operator< (const TRational &dur) const |
bool | operator<= (const TRational &dur) const |
bool | operator== (const TRational &dur) const |
bool | operator!= (const TRational &dur) const |
bool | operator> (double num) const |
bool | operator>= (double num) const |
bool | operator< (double num) const |
bool | operator<= (double num) const |
bool | operator== (double) const |
void | rationalise () |
operator string () const | |
operator double () const | |
operator float () const | |
operator int () const | |
virtual string | toString () const |
double | toDouble () const |
float | toFloat () const |
int | toInt () const |