AS3 Help For Commas

后端 未结 1 1580
北荒
北荒 2021-01-17 06:42

I have this code and I want commas in my numbers. The jackpot is €169.85 but it is displayed as 16985 00 in the game. How to fix that?

public fu         


        
相关标签:
1条回答
  • 2021-01-17 07:36

    ou could try something like;

    var jp:Number = jackpot * denom;
    jp = Math.round(jp * 100)/100; // value should be something like 1698500
    jp = jp / 10000; // value should be something like 169.85 now
    var s:String = String(jp);
    return s;
    
    0 讨论(0)
提交回复
热议问题