MathUtils
A library to perform math operations with optimizations.
This library is based on the code snippet from the OpenZeppelin Contracts Math library. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/05d4bf57ffed8c65256ff4ede5c3cf7a0b738e7d/contracts/utils/math/Math.sol
Functions
diff
Calculates the absolute difference between two unsigned integers.
function diff(uint256 a, uint256 b) internal pure returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | The first number. |
b | uint256 | The second number. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The absolute difference between a and b . |