mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
锻造升级
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user