Skip to main content

In-Person Payments

Decimal_base.hpp

Last updated: 16-Jul-2024

namespace verifone_sdk

struct DecimalBase

  • The Decimal class provides operations on numbers for arithmetic, scale handling, rounding, comparison, and format conversion (eg. to string), while retaining precision across platforms so that it can be used for currency
  • Subclassed by verifone_sdk::Decimal

Public Functions

inline DecimalBase(int32_t scale_, int64_t value_)
virtual ~DecimalBase() = default

Public Members

int32_t scale

  • The scale or number of digits to the right of the decimal separator.

int64_t value

  • The value of the number without applying the scale.

Public Static Attributes

static constexpr int32_t DEFAULT_PRECISION

  • The default precision or number of digits to the right of the decimal separator.

Protected Functions

DecimalBase(const DecimalBase&) = default
DecimalBase(DecimalBase&&) = default
DecimalBase &operator=(const DecimalBase&) = default
DecimalBase &operator=(DecimalBase&&) = default

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo