Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
322a9598
Commit
322a9598
authored
Jul 06, 2017
by
Francisco Giordano
Committed by
GitHub
Jul 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #289 from ezynda3/master
update according to changes in #288
parents
ba86e8e0
f2c2c01f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
math.rst
docs/source/math.rst
+24
-0
safemath.rst
docs/source/safemath.rst
+5
-4
No files found.
docs/source/math.rst
0 → 100644
View file @
322a9598
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.
docs/source/safemath.rst
View file @
322a9598
...
@@ -8,17 +8,17 @@ assert(bool assertion) internal
...
@@ -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.
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.
Multiplies two unisgned integers. Asserts that dividing the product by the non-zero multiplicand results in the multiplier.
s
afeSub(uint a, uint b) internal returns (uint
)
s
ub(uint256 a, uint256 b) internal returns (uint256
)
"""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""
Checks that b is not greater than a before subtracting.
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.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment