Template:Numdisplay: Difference between revisions
From IdleOn MMO Wiki
m (Adjust Numdisplay to display numbers between 1000-9999 as 1k..9.99k to match remaining brackets. Previously everything below 10k would be displayed fully without a base10 multiplier.) |
m (By convention kilo, 'k' isn't capitalized) |
||
Line 6: | Line 6: | ||
#ifexpr:((({{{1}}}) >= 1E+9) and (({{{1}}}) < 1E+12))|{{#tip-text:{{formatnum:{{#expr:{{#expr:({{{1}}}) / 1E+9}} round 1}}}} B| <span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}}}{{ | #ifexpr:((({{{1}}}) >= 1E+9) and (({{{1}}}) < 1E+12))|{{#tip-text:{{formatnum:{{#expr:{{#expr:({{{1}}}) / 1E+9}} round 1}}}} B| <span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}}}{{ | ||
#ifexpr:((({{{1}}}) >= 1E+6) and (({{{1}}}) < 1E+9))|{{#tip-text:{{formatnum:{{#expr:{{#expr:({{{1}}}) / 1E+6}} round 1}}}} M| <span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}}}{{ | #ifexpr:((({{{1}}}) >= 1E+6) and (({{{1}}}) < 1E+9))|{{#tip-text:{{formatnum:{{#expr:{{#expr:({{{1}}}) / 1E+6}} round 1}}}} M| <span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}}}{{ | ||
#ifexpr:((({{{1}}}) >= 1E+3) and (({{{1}}}) < 1E+6))|{{#tip-text:{{formatnum:{{#expr:{{#expr:({{{1}}}) / 1E+3}} round 1}}}} | #ifexpr:((({{{1}}}) >= 1E+3) and (({{{1}}}) < 1E+6))|{{#tip-text:{{formatnum:{{#expr:{{#expr:({{{1}}}) / 1E+3}} round 1}}}} k| <span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}}}{{ | ||
#ifexpr:((({{{1}}}) >= 0) and (({{{1}}}) < 1E+3))|<span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}<!-- | #ifexpr:((({{{1}}}) >= 0) and (({{{1}}}) < 1E+3))|<span class="text-only">{{formatnum:{{{2|{{{1}}}}}}}}</span> }}<!-- | ||
iferror closing tag -->}}<!-- | iferror closing tag -->}}<!-- | ||
ifeq closing tag -->}} | ifeq closing tag -->}} |