@@ -141,15 +141,16 @@ export enum RoundingMode {
141
141
*
142
142
* Sample Usage:
143
143
* ```javascript
144
- * const { Big, MathContext , RoundingMode } = require('bigdecimal.js');
144
+ * const { Big, MC , RoundingMode } = require('bigdecimal.js');
145
145
*
146
146
* const x = Big('1');
147
147
* const y = Big('3');
148
148
*
149
- * const res1 = x.divide (y, new MathContext (3));
149
+ * const res1 = x.divideWithMathContext (y, new MC (3));
150
150
* console.log(res1.toString()); // 0.333
151
151
*
152
- * const res2 = x.divide(y, MathContext(3, RoundingMode.UP)); // You can also use without `new` operator
152
+ * // You can also use without `new` operator
153
+ * const res2 = x.divideWithMathContext(y, MC(3, RoundingMode.UP));
153
154
* console.log(res2.toString()); // 0.334
154
155
*
155
156
* try {
@@ -4253,19 +4254,17 @@ interface BigDecimalConstructor {
4253
4254
* const { Big } = require('bigdecimal.js');
4254
4255
*
4255
4256
* // Constructor accepts any value such as string and BigDecimal itself:
4256
- *
4257
4257
* const x = Big('1.1111111111111111111111');
4258
4258
* const y = Big(x);
4259
4259
*
4260
+ * // You can do arithmetic operations
4260
4261
* const z = x.add(y);
4261
4262
* console.log(z.toString()); // 2.2222222222222222222222
4262
4263
*
4263
- *
4264
+ * // You can also construct a BigDecimal from a number or a BigInt:
4264
4265
* const u = Big(1.1);
4265
4266
* const v = Big(2n);
4266
4267
*
4267
- * // You can also construct a BigDecimal from a number or a BigInt:
4268
- *
4269
4268
* console.log(u.toString()); // 1.1
4270
4269
* console.log(v.toString()); // 2
4271
4270
* ```
@@ -4299,15 +4298,16 @@ interface MathContextConstructor {
4299
4298
*
4300
4299
* Sample Usage:
4301
4300
* ```javascript
4302
- * const { Big, MathContext , RoundingMode } = require('bigdecimal.js');
4301
+ * const { Big, MC , RoundingMode } = require('bigdecimal.js');
4303
4302
*
4304
4303
* const x = Big('1');
4305
4304
* const y = Big('3');
4306
4305
*
4307
- * const res1 = x.divide (y, new MathContext (3));
4306
+ * const res1 = x.divideWithMathContext (y, new MC (3));
4308
4307
* console.log(res1.toString()); // 0.333
4309
4308
*
4310
- * const res2 = x.divide(y, MathContext(3, RoundingMode.UP)); // You can also use without `new` operator
4309
+ * // You can also use without `new` operator
4310
+ * const res2 = x.divideWithMathContext(y, MC(3, RoundingMode.UP));
4311
4311
* console.log(res2.toString()); // 0.334
4312
4312
*
4313
4313
* try {
0 commit comments