房间UI修改
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.nnbc123.library.utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
@@ -112,5 +113,17 @@ public class FormatUtils {
|
||||
// if (value >= 1000000) return (value / 100) / 100f + "万";
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static String formatRankValue(int goldAmount){
|
||||
String strGoldAmount;
|
||||
if (goldAmount >= 10000) {
|
||||
BigDecimal b = BigDecimal.valueOf(goldAmount / 10000.0);
|
||||
double df = b.setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
strGoldAmount = df + "万";
|
||||
} else {
|
||||
strGoldAmount = String.valueOf(goldAmount);
|
||||
}
|
||||
return strGoldAmount;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user