|
LibMusicXML 3.22
|
Rational number representation.
#include <rational.h>
Public Member Functions | |
| rational (long int num=0, long int denom=1) | |
| rational (const rational &d) | |
| rational (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) |
| rational | operator+ (const rational &dur) const |
| rational | operator- (const rational &dur) const |
| rational | operator* (const rational &dur) const |
| Useful for notes with dots. | |
| rational | operator/ (const rational &dur) const |
| rational | operator* (int num) const |
| rational | operator/ (int num) const |
| rational & | operator+= (const rational &dur) |
| rational & | operator-= (const rational &dur) |
| rational & | operator*= (const rational &dur) |
| Useful for notes with dots. | |
| rational & | operator/= (const rational &dur) |
| rational & | operator*= (long int num) |
| rational & | operator/= (long int num) |
| rational & | operator= (const rational &dur) |
| bool | operator> (const rational &dur) const |
| bool | operator>= (const rational &dur) const |
| bool | operator< (const rational &dur) const |
| bool | operator<= (const rational &dur) const |
| bool | operator== (const rational &dur) const |
| bool | operator!= (const rational &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 () |
| void | print (ostream &os) const |
| operator string () const | |
| operator double () const | |
| operator float () const | |
| operator int () const | |
| string | toString () const |
| double | toDouble () const |
| float | toFloat () const |
| int | toInt () const |