lyb-js 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Math/LibJsCalculateExpression.js +1 -1
- package/Math/LibJsDecimal.js +1 -1
- package/lyb.js +3698 -8
- package/package.json +1 -1
|
@@ -99,7 +99,7 @@ export const libJsCalculateExpression = (expression, point = 2) => {
|
|
|
99
99
|
try {
|
|
100
100
|
//调用计算器并返回结果
|
|
101
101
|
const result = evaluate(expression);
|
|
102
|
-
return Number(result.toFixed(point)); //保留指定的小数位数
|
|
102
|
+
return Number(result.toFixed(point, Decimal.ROUND_DOWN)); //保留指定的小数位数
|
|
103
103
|
}
|
|
104
104
|
catch (error) {
|
|
105
105
|
throw new Error("表达式计算失败:" + error.message);
|
package/Math/LibJsDecimal.js
CHANGED