Skip to content

Commit

Permalink
Update contracts/utils/math/Math.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Jul 13, 2023
1 parent 938bce0 commit 12e6dad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/utils/math/Math.sol
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ library Math {
}
}

/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
Expand Down

0 comments on commit 12e6dad

Please sign in to comment.