Explorar el Código

Merge pull request #289 from ezynda3/master

update according to changes in #288
Francisco Giordano hace 8 años
padre
commit
322a9598ab
Se han modificado 2 ficheros con 28 adiciones y 4 borrados
  1. 24 0
      docs/source/math.rst
  2. 4 4
      docs/source/safemath.rst

+ 24 - 0
docs/source/math.rst

@@ -0,0 +1,24 @@
+Math
+=============================================
+
+Provides assorted low-level math operations.
+
+max64(uint64 a, uint64 b) internal constant returns (uint64)
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+Returns the largest of two uint64 numbers.
+
+min64(uint64 a, uint64 b) internal constant returns (uint64)
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+Returns the smallest of two uint64 numbers.
+
+max64(uint256 a, uint256 b) internal constant returns (uint256)
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+Returns the largest of two uint256 numbers.
+
+min64(uint256 a, uint256 b) internal constant returns (uint256)
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+Returns the smallest of two uint256 numbers.

+ 4 - 4
docs/source/safemath.rst

@@ -8,17 +8,17 @@ assert(bool assertion) internal
 
 Throws an error if the passed result is false. Used in this contract by checking mathematical expressions.
 
-safeMul(uint a, uint b) internal returns (uint)
+mul(uint256 a, uint256 b) internal returns (uint256)
 """""""""""""""""""""""""""""""""""""""""""""""""
 
 Multiplies two unisgned integers. Asserts that dividing the product by the non-zero multiplicand results in the multiplier.
 
-safeSub(uint a, uint b) internal returns (uint)
+sub(uint256 a, uint256 b) internal returns (uint256)
 """""""""""""""""""""""""""""""""""""""""""""""""
 
 Checks that b is not greater than a before subtracting.
 
-safeAdd(uint a, uint b) internal returns (uint)
+add(uint256 a, uint256 b) internal returns (uint256)
 """""""""""""""""""""""""""""""""""""""""""""""""
 
-Checks that the result is greater than both a and b.
+Checks that the result is greater than both a and b.