decomposeNonZeroInterval
Helper for calculating range size for a non-zero-starting interval.
The bitmath here decomposes the interval into two parts that in combination represent the compact range needed to express the interval.
function decomposeNonZeroInterval(uint256 begin, uint256 end) pure returns (uint256 left, uint256 right);
Parameters
| Name | Type | Description |
|---|---|---|
begin | uint256 | The start of the interval of the range's coverage (inclusive). |
end | uint256 | The end of the interval of the range's coverage (exclusive). |
Returns
| Name | Type | Description |
|---|---|---|
left | uint256 | The left part of the interval. |
right | uint256 | The right part of the interval. |