View Source: openzeppelin-solidity/contracts/math/Math.solarrow-up-right
Math
Assorted math operations
max(uint256 a, uint256 b)
min(uint256 a, uint256 b)
average(uint256 a, uint256 b)
Returns the largest of two numbers.
function max(uint256 a, uint256 b) internal pure returns(uint256)
Arguments
Name
Type
Description
a
uint256
b
Returns the smallest of two numbers.
Calculates the average of two numbers. Since these are integers, averages of an even and odd number cannot be represented, and will be rounded down.
Last updated 6 years ago
Was this helpful?
function min(uint256 a, uint256 b) internal pure returns(uint256)
function average(uint256 a, uint256 b) internal pure returns(uint256)