|
@@ -90,7 +90,7 @@ const ZhCalc = (function () {
|
|
|
* @param num2 - 除数
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
- function div(num1, num2) {
|
|
|
+ function div(num1, num2, digit = 6) {
|
|
|
if (num2 && !checkZero(num2)) {
|
|
|
return Decimal.div(num1 ? num1: 0, num2).toDecimalPlaces(digit).toNumber();
|
|
|
} else {
|