Rational number representation.
More...
|
| Rational (int64 numeratorValue=0, uint64 denominatorValue=INVALID) |
| Creates exemplar of Rational initializing numerator and denominator.
|
|
bool | valid () const |
| Checks if value is valid.
|
|
template<typename T > |
T | convertTo () const |
| Converts Rational representation to needed number type. More...
|
|
| operator float () const |
| Implicit conversion to float number type.
|
|
| operator double () const |
| Implicit conversion to double number type.
|
|
std::string | toString () const |
| string representation of rational number
|
|
Rational number representation.
Converts Rational representation to needed number type.
Target number type should have accessible constructor from int type, and should have visible operator/.
decimal price = exchangePrice.convertTo<decimal>()