mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2026-09-24 21:04:32 +00:00
Code Review Changes: Updates test file and void check
Also removes superfluous line that the tests now cater for.
This commit is contained in:
@@ -2150,7 +2150,11 @@
|
||||
rm = Ctor.rounding;
|
||||
} else {
|
||||
y = new Ctor(y);
|
||||
if (rm !== void 0) checkInt32(rm, 0, 8);
|
||||
if (rm === void 0) {
|
||||
rm = Ctor.rounding;
|
||||
} else {
|
||||
checkInt32(rm, 0, 8);
|
||||
}
|
||||
|
||||
// If x is not finite, return x if y is not NaN, else NaN.
|
||||
if (!x.d) return y.s ? x : y;
|
||||
@@ -2165,7 +2169,6 @@
|
||||
// If y is not zero, calculate the nearest multiple of y to x.
|
||||
if (y.d[0]) {
|
||||
external = false;
|
||||
if (rm === 1 || rm === 3) rm = [4, 5, 7, 8][rm];
|
||||
x = divide(x, y, 0, rm, 1).times(y);
|
||||
external = true;
|
||||
finalise(x);
|
||||
|
||||
Reference in New Issue
Block a user