Skip to content

Commit cd8a47f

Browse files
committed
#150 Add static rounding modes to Big constructor
1 parent d63c314 commit cd8a47f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

big.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
Big.NE = NE;
121121
Big.PE = PE;
122122
Big.strict = STRICT;
123+
Big.roundDown = 0;
124+
Big.roundHalfUp = 1;
125+
Big.roundHalfEven = 2;
126+
Big.roundUp = 3;
123127

124128
return Big;
125129
}

big.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ function _Big_() {
117117
Big.NE = NE;
118118
Big.PE = PE;
119119
Big.strict = STRICT;
120+
Big.roundDown = 0;
121+
Big.roundHalfUp = 1;
122+
Big.roundHalfEven = 2;
123+
Big.roundUp = 3;
120124

121125
return Big;
122126
}

0 commit comments

Comments
 (0)