An exact decimal number as the instrument printed it: +0021513.0 is {215130, 1}.
More...
#include <alicat_basis2_types.hpp>
|
| constexpr double | ToDouble () const noexcept |
| |
| constexpr int64_t | ToMilli () const noexcept |
| |
|
|
int64_t | mantissa {0} |
| | The number without its decimal point.
|
| |
|
uint8_t | decimals {0} |
| | Digits after the point.
|
| |
|
|
constexpr bool | operator== (const Decimal &, const Decimal &)=default |
| | Equal mantissa and equal decimal count (hidden friend, MISRA C++:2023 Rule 16.6.1).
|
| |
An exact decimal number as the instrument printed it: +0021513.0 is {215130, 1}.
mantissa stays below 10^15 and decimals below 7 for everything the driver parses.
◆ ToDouble()
| constexpr double alicat_basis2::Decimal::ToDouble |
( |
| ) |
const |
|
inlineconstexprnoexcept |
- Returns
- The value as a double (division by a power of ten; exact for the digits the instrument prints).
◆ ToMilli()
| constexpr int64_t alicat_basis2::Decimal::ToMilli |
( |
| ) |
const |
|
inlineconstexprnoexcept |
- Returns
- The value in thousandths, rounded half away from zero.
The documentation for this struct was generated from the following file: