Rational number useful for expressing fractions precisely.
| Property | Description |
|---|---|
| Invalid | Invalid rational value. |
| Property | Description |
|---|---|
| denominator | Fraction denominator. |
| inverse | The inverse of the rational number. |
| isNegative | Whether the rational number is negative. |
| isValid | Whether the rational number is valid. |
| isZero | Whether the rational number is zero. |
| numerator | Fraction numerator. |
| Constructor | Description |
|---|---|
| MediaRational | Constructs a rational number. The version that omits the denominator sets it to 1. |
| Method | Description |
|---|---|
| Set | Sets the numerator and denominator, performing normalization. |
| Operator | Description |
|---|---|
| double | Returns the rational value expressed as a floating point value. |