public String formatDouble3(double pDouble) { return String.valueOf(BigDecimal.valueOf(pDouble / 1000.0f).setScale(3, BigDecimal.ROUND_HALF_UP)); }
android 保留后3位小数
![](https://img-home.csdnimg.cn/images/20240711042549.png)
public String formatDouble3(double pDouble) { return String.valueOf(BigDecimal.valueOf(pDouble / 1000.0f).setScale(3, BigDecimal.ROUND_HALF_UP)); }