优化代码

This commit is contained in:
RuoYi
2025-02-28 13:03:33 +08:00
parent 57293a2ecf
commit 4bbe3f3b56
10 changed files with 35 additions and 18 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();
}
}