Skip to content

Commit

Permalink
Fix another typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lohann committed Apr 29, 2024
1 parent fa7b02e commit 07bcce5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/utils/math/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ library Math {
}

/**
* @dev Unsigned saturating substraction, bounds to zero instead of overflowing.
* @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.
*/
function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {
unchecked {
Expand Down Expand Up @@ -111,9 +111,9 @@ library Math {
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
// In EVM a value modulus zero is equal to zero.
success = b > 0;
assembly {
success := gt(b, 0)
// In EVM a value modulus zero is equal to zero.
result := mod(a, b)
}
}
Expand Down

0 comments on commit 07bcce5

Please sign in to comment.