Template:Cents: Difference between revisions
m Xenwolf moved page User:Xenwolf/Template:Cents to Template:Cents: Ready to use. The only limitation is that danling zeros are currently not supported. |
... commenting out is a bit complicated in templates - but now hopefully fixed |
||
Line 1: | Line 1: | ||
<!-- {{#number_format:{{#expr: 1200*ln({{{1|{{{ratio|1}}}}}})/ln(2)}}|{{{2|{{{precision|0}}}}}}|.|}}< | <noinclude><!-- {{#number_format:{{#expr: 1200*ln({{{1|{{{ratio|1}}}}}})/ln(2)}}|{{{2|{{{precision|0}}}}}}|.|}} <ORIGINAL NOINCLUDE> | ||
This template calculates the cent value of its first argument (defaults to 1). An optional second argument controls the precision, it defaults to 0 decimal places. | This template calculates the cent value of its first argument (defaults to 1). An optional second argument controls the precision, it defaults to 0 decimal places. | ||
Line 5: | Line 5: | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude | --></noinclude>{{#expr: 1200*ln({{{1|{{{ratio|1}}}}}})/ln(2) round {{{precision|{{{2|0}}}}}}}}<noinclude> | ||
This template calculates the cent value of its first argument (defaults to 1). An optional second argument controls the precision, it defaults to 0 decimal places. | This template calculates the cent value of its first argument (defaults to 1). An optional second argument controls the precision, it defaults to 0 decimal places. | ||