Transpile e170b59f

This commit is contained in:
github-actions
2022-02-08 09:01:46 +00:00
parent 6f7d517d7c
commit 47de4b8f94
8 changed files with 45 additions and 39 deletions

View File

@ -40,14 +40,4 @@ library MathUpgradeable {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a / b + (a % b == 0 ? 0 : 1);
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}