The encoding consists of the integer value divided by the multiplier
, minus the ceil of minimum
divided by the multiplier
, encoded as an 8-bit fixed-length unsigned integer.
More...
Public Attributes | |
const std::int64_t | minimum |
The inclusive minimum value. | |
const std::int64_t | maximum |
The inclusive maximum value. | |
const std::uint64_t | multiplier |
The multiplier value. | |
The encoding consists of the integer value divided by the multiplier
, minus the ceil of minimum
divided by the multiplier
, encoded as an 8-bit fixed-length unsigned integer.
Option | Type | Description |
---|---|---|
minimum | int | The inclusive minimum value |
maximum | int | The inclusive maximum value |
multiplier | uint | The multiplier value |
Condition | Description |
---|---|
value >= minimum | The input value must be greater than or equal to the minimum |
value <= maximum | The input value must be less than or equal to the maximum |
value % multiplier == 0 | The input value must be divisible by the multiplier |
floor(maximum / multiplier) - ceil(minimum / multiplier) < 2 ** 8 | The divided range must be representable in 8 bits |
Given the input value 15, where the minimum is 1, the maximum is 19, and the multiplier is 5, the encoding results in the 8-bit unsigned integer 2: