Pecunia 0.9.0-alpha.22
Library using the ISO-4217 currency standard & a fixed monetary unit size
|
Functions | |
PECUNIA_EXPORT MajorUnit | down (const MajorUnit &amount, const std::uint8_t &minorDigits, const std::uint8_t &digitsLeft) |
Performs a rounding operation using the round-half down towards -∞ method. | |
PECUNIA_EXPORT MajorUnit | even (const MajorUnit &amount, const std::uint8_t &minorDigits, const std::uint8_t &digitsLeft) |
Performs a rounding operation using the round-half to even method. | |
PECUNIA_EXPORT MajorUnit | none (const MajorUnit &amount, const std::uint8_t &minorDigits, const std::uint8_t &digitsLeft) |
Performs no rounding operation. | |
PECUNIA_EXPORT MajorUnit | up (const MajorUnit &amount, const std::uint8_t &minorDigits, const std::uint8_t &digitsLeft) |
Performs a rounding operation using the round-half up towards +∞ method. | |
|
nodiscard |
Performs a rounding operation using the round-half down towards -∞ method.
amount | The major and minor units of the currency stored as one. |
minorDigits | The number of digits in the minor unit. |
digitsLeft | The number of digits left in the minor unit after rounding the number to the right of the decimal point. |
|
nodiscard |
Performs a rounding operation using the round-half to even method.
amount | The major and minor units of the currency stored as one. |
minorDigits | The number of digits in the minor unit. |
digitsLeft | The number of digits left in the minor unit after rounding the number to the right of the decimal point. |
|
nodiscard |
Performs no rounding operation.
amount | The major and minor units of the currency stored as one. |
minorDigits | Ignored. |
digitsLeft | Ignored. |
|
nodiscard |
Performs a rounding operation using the round-half up towards +∞ method.
amount | The major and minor units of the currency stored as one. |
minorDigits | The number of digits in the minor unit. |
digitsLeft | The number of digits left in the minor unit after rounding the number to the right of the decimal point. |