SignedMathHelper
Functions
add
Returns the addition of two int256.
function add(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
sub
Returns the subtraction of two int256.
function sub(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
mul
Returns the multiplication of two int256.
function mul(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
div
Returns the division of two int256.
function div(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
max
See SignedMath.
function max(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
min
See SignedMath.
function min(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
average
See SignedMath.
function average(int256 a, int256 b) external pure returns (int256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 | |
| b | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | int256 |
abs
See SignedMath.
function abs(int256 a) external pure returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| a | int256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |