We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Math.ternary
1 parent 4032b42 commit 60697cbCopy full SHA for 60697cb
contracts/utils/math/SignedMath.sol
@@ -18,7 +18,7 @@ library SignedMath {
18
*/
19
function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {
20
unchecked {
21
- // branchless terinary works because:
+ // branchless ternary works because:
22
// b ^ (a ^ b) == a
23
// b ^ 0 == b
24
return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));
0 commit comments