-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
23,155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#///////////////////////////////////////////////////////////////////////////// | ||
# Fireball Projects | ||
#///////////////////////////////////////////////////////////////////////////// | ||
|
||
library/ | ||
temp/ | ||
local/ | ||
build/ | ||
|
||
#///////////////////////////////////////////////////////////////////////////// | ||
# Logs and databases | ||
#///////////////////////////////////////////////////////////////////////////// | ||
|
||
*.log | ||
*.sql | ||
*.sqlite | ||
|
||
#///////////////////////////////////////////////////////////////////////////// | ||
# files for debugger | ||
#///////////////////////////////////////////////////////////////////////////// | ||
|
||
*.sln | ||
*.csproj | ||
*.pidb | ||
*.unityproj | ||
*.suo | ||
|
||
#///////////////////////////////////////////////////////////////////////////// | ||
# OS generated files | ||
#///////////////////////////////////////////////////////////////////////////// | ||
|
||
.DS_Store | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
#///////////////////////////////////////////////////////////////////////////// | ||
# exvim files | ||
#///////////////////////////////////////////////////////////////////////////// | ||
|
||
*UnityVS.meta | ||
*.err | ||
*.err.meta | ||
*.exvim | ||
*.exvim.meta | ||
*.vimentry | ||
*.vimentry.meta | ||
*.vimproject | ||
*.vimproject.meta | ||
.vimfiles.*/ | ||
.exvim.*/ | ||
quick_gen_project_*_autogen.bat | ||
quick_gen_project_*_autogen.bat.meta | ||
quick_gen_project_*_autogen.sh | ||
quick_gen_project_*_autogen.sh.meta | ||
.exvim.app | ||
|
||
#///////////////////////////////////////////////////////////////////////////// | ||
# webstorm files | ||
#///////////////////////////////////////////////////////////////////////////// | ||
|
||
.idea/ | ||
|
||
#////////////////////////// | ||
# VS Code | ||
#////////////////////////// | ||
|
||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# BigNumber64Demo | ||
> 介绍如何在 javascript 处理64位大数。 | ||
### 方案1 | ||
[long.js](https://github.com/dcodeIO/long.js) 库 | ||
##### 介绍 | ||
A Long class for representing a 64 bit two's-complement integer value derived from the Closure Library for stand-alone use and extended with unsigned support. | ||
|
||
##### 简单使用 | ||
~~~ | ||
var Long = require("long"); | ||
var longVal = new Long(0xFFFFFFFF, 0x7FFFFFFF); | ||
console.log(longVal.toString()); | ||
~~~ | ||
|
||
##### 优势 | ||
* 可以把服务器发过来的高位、底位数据合成一个大数。显示,+、-、*、/、。 | ||
|
||
### 方案2 | ||
[bignumber.js](https://github.com/alexbardas/bignumber.js) 库 | ||
##### 介绍 | ||
BigNumber.js is a light javascript library for node.js and the browser. It supports arithmetic operations on Big Integers. | ||
|
||
It is build with performance in mind, uses the fastest algorithms and supports all basic arithmetic operations (+, -, *, /, %, ^, abs). Works with both positive and negative big integers. | ||
|
||
##### 简单介绍 | ||
~~~ | ||
var BigNumber = require('big-number'); | ||
BigNumber(5).plus(97).minus(53).plus(434).multiply(5435423).add(321453).multiply(21).div(2).pow(2); | ||
// 760056543044267246001 | ||
~~~ | ||
|
||
##### 优势 | ||
* 支持add/plus, minus/subtract, multiply/mult, divide/div, power/pow, mod, equals, lt, lte, gt, gte, isZero, abs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"ver": "1.0.1", | ||
"uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", | ||
"isGroup": false, | ||
"subMetas": {} | ||
} |
Oops, something went wrong.