Description 描述
Rational number useful for expressing fractions precisely.
Static Properties
| Invalid | Invalid rational value. |
Properties 属性
| 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. |
Constructors
| MediaRational | Constructs a rational number. The version that omits the denominator sets it to 1. |
Public Methods 公共方法
| Set | Sets the numerator and denominator, performing normalization. |
Operators 运算符
| Unknown operator | Returns the rational value expressed as a floating point value. |