parent
a66f5f8f03
commit
ba383a6d20
@ -0,0 +1,24 @@ |
||||
pragma solidity ^0.4.11; |
||||
|
||||
/** |
||||
* @title Math |
||||
* @dev Assorted math operations |
||||
*/ |
||||
|
||||
contract Math { |
||||
function max64(uint64 a, uint64 b) internal constant returns (uint64) { |
||||
return a >= b ? a : b; |
||||
} |
||||
|
||||
function min64(uint64 a, uint64 b) internal constant returns (uint64) { |
||||
return a < b ? a : b; |
||||
} |
||||
|
||||
function max256(uint256 a, uint256 b) internal constant returns (uint256) { |
||||
return a >= b ? a : b; |
||||
} |
||||
|
||||
function min256(uint256 a, uint256 b) internal constant returns (uint256) { |
||||
return a < b ? a : b; |
||||
} |
||||
} |
Loading…
Reference in new issue