优化代码

This commit is contained in:
RuoYi
2025-02-28 12:58:03 +08:00
parent bf46e38c29
commit 511ff0f125
10 changed files with 33 additions and 17 deletions

View File

@ -108,7 +108,6 @@ public class Arith
"The scale must be a positive integer or zero");
}
BigDecimal b = new BigDecimal(Double.toString(v));
BigDecimal one = BigDecimal.ONE;
return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue();
return b.divide(BigDecimal.ONE, scale, RoundingMode.HALF_UP).doubleValue();
}
}