Rational
A number type allowing for higher precision when used to represent a rational number
with a specified denominator.
Extended by
Constructor
Represents a number that can be expressed in the form numerator / denominator. Supports a fixed set of denominator values.
new Rational(numerator: number, denominatorType: DenominatorType, doubleValue: number = numerator / denominatorValue[denominatorType]): Rational
Represents a number that can be expressed in the form numerator / denominator. Supports a fixed set of denominator values.
Methods
valueOf(): number
Returns the doubleValue.
Returns number
toString(): string
Returns string
Properties
The numerator of the rational number.
The type of the denominator of the rational number.
The closest JavaScript number (if not supplied an approximation is calculated).
Also in this Section