Skip to content

Commit

Permalink
Fix typo in Math.ternary (OpenZeppelin#5026)
Browse files Browse the repository at this point in the history
Signed-off-by: snoppy <michaleli@foxmail.com>
  • Loading branch information
xiaoxianBoy authored Apr 25, 2024
1 parent 4032b42 commit 60697cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/utils/math/SignedMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library SignedMath {
*/
function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {
unchecked {
// branchless terinary works because:
// branchless ternary works because:
// b ^ (a ^ b) == a
// b ^ 0 == b
return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));
Expand Down

0 comments on commit 60697cb

Please sign in to comment.