diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 07:16:44 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 07:16:44 +0800 |
commit | 80291caf7cef16f0b300484755960d92d6750a6a (patch) | |
tree | da0f38b1b3cbc9958554ff7e0cb88329480ba91a /packages/contracts/src/2.0.0/protocol/Exchange/libs | |
parent | f6080367fe3a90762afea76a653c5df1315c45fa (diff) | |
download | dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.tar dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.tar.gz dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.tar.bz2 dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.tar.lz dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.tar.xz dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.tar.zst dexon-sol-tools-80291caf7cef16f0b300484755960d92d6750a6a.zip |
Append -Floor to getPartialAmount and isRoundingError
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/libs')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol index 90ec9e2b6..7d58f70ce 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol @@ -25,12 +25,12 @@ contract LibMath is SafeMath { - /// @dev Calculates partial value given a numerator and denominator. + /// @dev Calculates partial value given a numerator and denominator rounded down. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. /// @return Partial value of target rounded down. - function getPartialAmount( + function getPartialAmountFloor( uint256 numerator, uint256 denominator, uint256 target @@ -48,7 +48,7 @@ contract LibMath is return partialAmount; } - /// @dev Calculates partial value given a numerator and denominator. + /// @dev Calculates partial value given a numerator and denominator rounded down. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. @@ -79,7 +79,7 @@ contract LibMath is /// @param denominator Denominator. /// @param target Value to multiply with numerator/denominator. /// @return Rounding error is present. - function isRoundingError( + function isRoundingErrorFloor( uint256 numerator, uint256 denominator, uint256 target |