Skip to content

Commit

Permalink
Some commas to semicolons reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcl committed May 29, 2022
1 parent ed783f8 commit 9a37786
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions bignumber.js
Expand Up @@ -2007,7 +2007,12 @@
}

// x < y? Point xc to the array of the bigger number.
if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
if (xLTy) {
t = xc;
xc = yc;
yc = t;
y.s = -y.s;
}

b = (j = yc.length) - (i = xc.length);

Expand Down Expand Up @@ -2161,7 +2166,14 @@
ycL = yc.length;

// Ensure xc points to longer array and xcL to its length.
if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
if (xcL < ycL) {
zc = xc;
xc = yc;
yc = zc;
i = xcL;
xcL = ycL;
ycL = i;
}

// Initialise the result array with zeros.
for (i = xcL + ycL, zc = []; i--; zc.push(0));
Expand Down Expand Up @@ -2282,7 +2294,12 @@
b = yc.length;

// Point xc to the longer array, and b to the shorter length.
if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
if (a - b < 0) {
t = yc;
yc = xc;
xc = t;
b = a;
}

// Only start adding at yc.length - 1 as the further digits of xc can be ignored.
for (a = 0; b;) {
Expand Down Expand Up @@ -2568,7 +2585,12 @@
intDigits = isNeg ? intPart.slice(1) : intPart,
len = intDigits.length;

if (g2) i = g1, g1 = g2, g2 = i, len -= i;
if (g2) {
i = g1;
g1 = g2;
g2 = i;
len -= i;
}

if (g1 > 0 && len > 0) {
i = len % g1 || g1;
Expand Down

0 comments on commit 9a37786

Please sign in to comment.