You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
530 B
25 lines
530 B
8 years ago
|
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;
|
||
|
}
|
||
|
}
|