Public Member Functions |
| Decimal (DecimalMantissa mantissa=0, DecimalExponent exponent=0) |
| Initializes instance from compound components.
|
| Decimal (Double value) |
| Converts from Double value using default conversion precision.
|
| Decimal (Double value, size_t precision) |
| Converts Double value to decimal.
|
| Decimal (const Decimal &other) |
| Initializes as copy of given value.
|
DecimalMantissa | mantissa () const |
| Returns mantissa part of decimal.
|
void | mantissa (DecimalMantissa) |
| Updates mantissa part of decimal.
|
DecimalExponent | exponent () const |
| Returns exponent part of decimal.
|
void | exponent (DecimalExponent) |
| Updates exponent part of decimal.
|
bool | operator== (const Decimal &) const |
| Compares two numbers.
|
bool | operator!= (const Decimal &) const |
| Compares two numbers.
|
| operator Int32 () const |
| Casts to whole integer number as regular floating point value is casted.
|
| operator UInt32 () const |
| Casts to whole integer number as regular floating point value is casted.
|
| operator Int64 () const |
| Casts to whole integer number as regular floating point value is casted.
|
| operator UInt64 () const |
| Casts to whole integer number as regular floating point value is casted.
|
| operator Double () const |
| Casts to whole floating point as regular value is casted to a smaller precision.
|
bool | toNumber (Int32 &) const |
| Casts to whole integer number as regular floating point value is casted.
|
bool | toNumber (UInt32 &) const |
| Casts to whole integer number as regular floating point value is casted.
|
bool | toNumber (Int64 &) const |
| Casts to whole integer number as regular floating point value is casted.
|
bool | toNumber (UInt64 &) const |
| Casts to whole integer number as regular floating point value is casted.
|
bool | toNumber (Double &) const |
| Casts to floating point number.
|
void | toString (std::string &) const |
| Appends text presentation to given string.
|
std::string | toString () const |
| Returns text presentation of decimal.
|
Decimal & | operator= (const Decimal &other) |
| Reinitializes instance from another one.
|
Static Public Member Functions |
static bool | tryParse (const char *buffer, size_t bufferSize, Decimal &) |
| Attempts to parse decimal value from its string/text presentation.
|
static Decimal | parse (const char *buffer, size_t bufferSize) |
| Parses decimal from string presentation.
|
Decimal type for better precision.