Definition at line 30 of file Rational.h.
◆ Rational() [1/3]
Constructs default instance.
Definition at line 86 of file Rational.h.
◆ Rational() [2/3]
Rational |
( |
long long | numerator, |
|
|
unsigned int | denominator ) |
|
inline |
Create initialized instance.
Definition at line 92 of file Rational.h.
◆ Rational() [3/3]
◆ convertTo()
Converts Rational representation to needed number type.
Target number type should have accessible constructor from int
type, and should have visible operator/
.
Decimal d = rational.convertTo<Decimal>()
Definition at line 110 of file Rational.h.
◆ noValue()
◆ operator double()
operator double |
( |
| ) |
const |
|
inline |
Implicit conversion to double number type.
Definition at line 120 of file Rational.h.
◆ operator float()
Implicit conversion to float number type.
Definition at line 115 of file Rational.h.
◆ operator!=()
bool operator!= |
( |
const Rational & | right | ) |
const |
|
inline |
◆ operator<()
bool operator< |
( |
const Rational & | right | ) |
const |
|
inline |
◆ operator<=()
bool operator<= |
( |
const Rational & | right | ) |
const |
|
inline |
◆ operator==()
bool operator== |
( |
const Rational & | right | ) |
const |
|
inline |
◆ operator>()
bool operator> |
( |
const Rational & | right | ) |
const |
|
inline |
◆ operator>=()
bool operator>= |
( |
const Rational & | right | ) |
const |
|
inline |
◆ toString()
std::string toString |
( |
| ) |
const |
◆ denominator
◆ NO_VALUE
This value indicates that value is in not set.
Definition at line 33 of file Rational.h.
◆ numerator