锻造升级

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-01-10 01:36:20 +08:00
parent 6fbb142edc
commit 0d745b9715
22 changed files with 5392 additions and 1230 deletions

View File

@@ -2,9 +2,18 @@
export default class NumberTools {
//随机
public GetRank(min, max) {
public static GetRank(min, max) {
return Math.round(Math.random() * (max - min)) + min;
}
//显示文本数字
public static NumberStr(value:number){
if(Math.floor(value / 1000000))
return `${(value / 1000000).toFixed(1)}M`
if(Math.floor(value / 1000))
return `${(value / 1000).toFixed(1)}K`
return value;
}
}