176 - OZ SignedSafeMath
OpenZeppelin SignedSafeMath: provides the same mathematical functions as SafeMath but for signed integers
-
myNumber.add(otherNumber)
: Returns the addition of two signed integers, reverting on overflow. Counterpart to Solidity's+
operator. -
myNumber.sub(otherNumber)
: Returns the subtraction of two signed integers, reverting on overflow (when the result is negative). Counterpart to Solidity's-
operator. -
myNumber.div(otherNumber)
: Returns the division of two signed integers, reverting on overflow. The result is rounded towards zero. Counterpart to Solidity's/
operator. -
myNumber.mul(otherNumber)
: Returns the multiplication of two signed integers, reverting on overflow. Counterpart to Solidity's*
operator.
- Math Functions
- Safe -> Overflow/Underflow
- add & sub & mul & div & mod
- using SignedSafeMath for int256
- Required: solc
<
0.8.0