new Rational()
A class for representing and manipulating rational numbers.
- Source:
Methods
Rational(arg1, arg2)
Constructs a new Rational object.
Parameters:
| Name | Type | Description |
|---|---|---|
arg1 |
object | number | [Optional] Rational object or numerator. |
arg2 |
string | [Optional] denominator. |
- Source:
Throws:
-
If more than two arguments are given, or invalid argument type is used.
- Type
- TypeError