Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Commas In IGM Numbers
  FAQ FAQ  Forum Search   Register Register  Login Login

Topic ClosedCommas In IGM Numbers

 Post Reply Post Reply Page  12>
Author
 Rating: Topic Rating: 2 Votes, Average 5.00  Topic Search Topic Search  Topic Options Topic Options
Bonaparta View Drop Down
Postmaster
Postmaster
Avatar

Joined: 03 Nov 2011
Location: Milky Way
Status: Offline
Points: 541
Direct Link To This Post Topic: Commas In IGM Numbers
    Posted: 08 Oct 2012 at 00:18
I would like to see change in the numbers also. Perhaps the numbers could be rounded with some sense. If I sell goods for 100M + something, I would much rather see 113.4M rather than 113400000.0000. If numbers are less than 1M than for example 654.3K would also work...

Back to Top
Salararius View Drop Down
Postmaster
Postmaster
Avatar

Joined: 26 Sep 2011
Location: USA
Status: Offline
Points: 519
Direct Link To This Post Posted: 07 Oct 2012 at 19:38
Originally posted by Faenix Faenix wrote:

You could do that .. Or String.Format("{0:n0}", 1234)
Um, I think that's C#, which is great if they formatted the IGM in C#.  I also don't think that will give the same format.  It will not format the decimals, only add commas.  Which is fine, but I think four decimal places is too many.

Back to Top
Beardo13 View Drop Down
New Poster
New Poster
Avatar

Joined: 19 Jul 2012
Status: Offline
Points: 31
Direct Link To This Post Posted: 06 Oct 2012 at 08:17
Originally posted by Rill Rill wrote:

I think it should be in scientific notation --  1.234 x 10^5

/me facepalm
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Direct Link To This Post Posted: 06 Oct 2012 at 01:47
Originally posted by DeathDealer89 DeathDealer89 wrote:

I'll counter with y not just use K anytime something goes above 10k  and M anytime something goes above 10M
Only if a click or floating hint gives you the exact number; sometimes you need the last few digits, especially if transporting resources that are in demand.
Back to Top
dunnoob View Drop Down
Postmaster
Postmaster
Avatar

Joined: 10 Dec 2011
Location: Elijal
Status: Offline
Points: 800
Direct Link To This Post Posted: 05 Oct 2012 at 23:31
/* REXX */ numeric form engineering; numeric digits 5; X = 1.234E5; say X /* yields 123.4E+3 */
Tongue


Edited by dunnoob - 05 Oct 2012 at 23:32
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 6903
Direct Link To This Post Posted: 05 Oct 2012 at 19:23
I think it should be in scientific notation --  1.234 x 10^5
Back to Top
Faenix View Drop Down
Forum Warrior
Forum Warrior


Joined: 29 Oct 2011
Status: Offline
Points: 283
Direct Link To This Post Posted: 05 Oct 2012 at 18:13
Originally posted by Salararius Salararius wrote:

function addCommas(n, dec)
{
  var rx = /(\d+)(\d{3})/;
  var decimalVal = Math.pow(10, dec);
  var numberStr = String(Math.round(n * decimalVal) / decimalVal);

  numberStr = numberStr.replace(/^\d+/, function(w)
                           {
                             while(rx.test(w))
                               w = w.replace(rx, '$1,$2');
                             return w;
                           });
  if (dec == 0)
    return numberStr;
  if (numberStr.indexOf(".") == -1)
    return numberStr + "." + String(decimalVal).substr(1);
  return numberStr + String(decimalVal).substr(numberStr.length - numberStr.indexOf("."))
}

You could do that .. Or String.Format("{0:n0}", 1234)
Back to Top
DeathDealer89 View Drop Down
Postmaster
Postmaster


Joined: 04 Jan 2012
Status: Offline
Points: 944
Direct Link To This Post Posted: 05 Oct 2012 at 17:47
I'll counter with y not just use K anytime something goes above 10k  and M anytime something goes above 10M
Back to Top
Albatross View Drop Down
Postmaster General
Postmaster General


Joined: 11 May 2011
Status: Offline
Points: 1118
Direct Link To This Post Posted: 05 Oct 2012 at 10:32
+1, but do it everywhere... http://forum.illyriad.co.uk/forum_posts.asp?TID=2805&PID=33742&title=localized-commaformatted-numbers#33742

Edited by Albatross - 05 Oct 2012 at 10:32
Back to Top
hellion19 View Drop Down
Forum Warrior
Forum Warrior


Joined: 01 Aug 2012
Status: Offline
Points: 310
Direct Link To This Post Posted: 05 Oct 2012 at 08:15
Would be a nice addition
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.