Browse Source

Merge pull request #56 in ~GUY/fineui from ~WINDY/fineui:master to master

* commit 'e1fcbf930f423388b80fb023184d314cf1db86a2':
  精度
es6
windy 8 years ago
parent
commit
7d4cc0d2db
  1. 2
      bi/core.js
  2. 2
      docs/core.js
  3. 2
      src/core/proto/number.js

2
bi/core.js

@ -6857,7 +6857,7 @@ function accDiv(arg1, arg2) {
with (Math) {
r1 = Number(arg1.toString().replace(".", ""));
r2 = Number(arg2.toString().replace(".", ""));
return (r1 / r2) * pow(10, t2 - t1);
return (t2 > t1) ? (r1 / r2) * pow(10, t2 - t1) : (r1 / r2) / pow(10, t1 - t2);
}
}

2
docs/core.js

@ -24390,7 +24390,7 @@ function accDiv(arg1, arg2) {
with (Math) {
r1 = Number(arg1.toString().replace(".", ""));
r2 = Number(arg2.toString().replace(".", ""));
return (r1 / r2) * pow(10, t2 - t1);
return (t2 > t1) ? (r1 / r2) * pow(10, t2 - t1) : (r1 / r2) / pow(10, t1 - t2);
}
}

2
src/core/proto/number.js

@ -259,7 +259,7 @@ function accDiv(arg1, arg2) {
with (Math) {
r1 = Number(arg1.toString().replace(".", ""));
r2 = Number(arg2.toString().replace(".", ""));
return (r1 / r2) * pow(10, t2 - t1);
return (t2 > t1) ? (r1 / r2) * pow(10, t2 - t1) : (r1 / r2) / pow(10, t1 - t2);
}
}

Loading…
Cancel
Save