@hubiinetwork/soldoc
Version:
Solidity documentation generator
236 lines (107 loc) • 2.63 kB
Markdown
# SafeMathInt
[see the source](https://github.com/dev-matan-tsuberi/soldoc/tree/master/contracts/SafeMathInt.sol)
> SafeMathInt
**Execution cost**: less than 249 gas
**Deployment cost**: less than 154400 gas
**Combined cost**: less than 154649 gas
## Methods
### clampMax(int256,int256)
**Execution cost**: less than 358 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
2. **max** *of type `int256`*
Returns:
1. **output_0** *of type `int256`*
### toInt256(uint256)
**Execution cost**: less than 537 gas
**Attributes**: constant
Params:
1. **a** *of type `uint256`*
Returns:
1. **output_0** *of type `int256`*
### neg(int256)
**Execution cost**: less than 632 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `int256`*
### clampMin(int256,int256)
**Execution cost**: less than 292 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
2. **min** *of type `int256`*
Returns:
1. **output_0** *of type `int256`*
### isNegativeInt256(int256)
**Execution cost**: less than 274 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `bool`*
### isPositiveInt256(int256)
**Execution cost**: less than 296 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `bool`*
### abs(int256)
**Execution cost**: No bound available
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `int256`*
### clamp(int256,int256,int256)
**Execution cost**: less than 414 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
2. **min** *of type `int256`*
3. **max** *of type `int256`*
Returns:
1. **output_0** *of type `int256`*
### isNonZeroPositiveInt256(int256)
**Execution cost**: less than 403 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `bool`*
### isNonZeroNegativeInt256(int256)
**Execution cost**: less than 381 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `bool`*
### toNonZeroInt256(uint256)
**Execution cost**: less than 475 gas
**Attributes**: constant
Params:
1. **a** *of type `uint256`*
Returns:
1. **output_0** *of type `int256`*
### toUInt256(int256)
**Execution cost**: less than 202 gas
**Attributes**: constant
Params:
1. **a** *of type `int256`*
Returns:
1. **output_0** *of type `uint256`*
[Back to the top ↑](#safemathint)