Remove Math.min64 and Math.max64 (#1156)

* remove Math.min64 and Math.max64

* refactor Math tests to use return values

* enhance Math coverage
This commit is contained in:
Francisco Giordano
2018-08-06 15:18:19 -03:00
committed by Nicolás Venturo
parent ba85aef95e
commit bf34911857
3 changed files with 28 additions and 56 deletions

View File

@ -6,19 +6,11 @@ pragma solidity ^0.4.24;
* @dev Assorted math operations
*/
library Math {
function max64(uint64 _a, uint64 _b) internal pure returns (uint64) {
function max(uint256 _a, uint256 _b) internal pure returns (uint256) {
return _a >= _b ? _a : _b;
}
function min64(uint64 _a, uint64 _b) internal pure returns (uint64) {
return _a < _b ? _a : _b;
}
function max256(uint256 _a, uint256 _b) internal pure returns (uint256) {
return _a >= _b ? _a : _b;
}
function min256(uint256 _a, uint256 _b) internal pure returns (uint256) {
function min(uint256 _a, uint256 _b) internal pure returns (uint256) {
return _a < _b ? _a : _b;
}
}