Skip to content

Commit a909a7d

Browse files
aviggianoAmxx
andauthored
Improve Math.sol NatSpec documentation (#5813)
Co-authored-by: Hadrien Croubois <[email protected]>
1 parent a774572 commit a909a7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/utils/math/Math.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ library Math {
134134
}
135135

136136
/**
137-
* @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
137+
* @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.
138138
*
139139
* IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
140-
* However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
140+
* However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute
141141
* one branch when needed, making this function more expensive.
142142
*/
143143
function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {

0 commit comments

Comments
 (0)