Add Prettier for linting and fix Solhint config (#2697)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Hadrien Croubois
2021-06-07 17:33:03 +02:00
committed by GitHub
parent e3661abe84
commit b0cf6fbb7a
134 changed files with 1816 additions and 1526 deletions

View File

@ -26,7 +26,7 @@ library Math {
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute.
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2);
}
/**