mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-12-08 01:59:14 +08:00
NumberUtil.pow增加重载,支持指数自定义保留位数(pr#4052@Github)
This commit is contained in:
parent
643b65ee5b
commit
68de50ecee
@ -13,6 +13,7 @@
|
||||
* 【core 】 `IoUtil.writeObjects`判空避免空指针(issue#4049@Github)
|
||||
* 【extra 】 `OsInfo`增加`isWindows11`方法(pr#4054@Github)
|
||||
* 【extra 】 `RedisDS`增加`getPool`和`getSetting`方法(issue#ICVWDI@Gitee)
|
||||
* 【core 】 `NumberUtil.pow`增加重载,支持指数自定义保留位数(pr#4052@Github)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题(issue#4039@Github)
|
||||
|
||||
@ -2570,7 +2570,7 @@ public class NumberUtil {
|
||||
* @param scale 保留的小数位 (指数为负数时生效)
|
||||
* @param roundingMode 保留小数的模式 {@link RoundingMode} (指数为负数时生效)
|
||||
* @return 幂的积
|
||||
* @since 4.1.0
|
||||
* @since 5.8.41
|
||||
*/
|
||||
public static BigDecimal pow(BigDecimal number, int n, int scale, RoundingMode roundingMode) {
|
||||
if (n < 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user