export default class NumberTools {

    //随机
    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;
    }
    
}