Template:Cents: Difference between revisions
Created page with "{{#number_format:{{#expr: 1200*ln({{{1|{{{ratio|2}}}}}})/ln(2)}}|{{{2|{{{precision=3}}}}}}|.|}}<noinclude> This template calculates the cent value of its argument. An optional..." |
default ratio 1, default precision 0 |
||
Line 1: | Line 1: | ||
{{#number_format:{{#expr: 1200*ln({{{1|{{{ratio| | {{#number_format:{{#expr: 1200*ln({{{1|{{{ratio|1}}}}}})/ln(2)}}|{{{2|{{{precision|0}}}}}}|.|}}<noinclude> | ||
This template calculates the cent value of its argument. An optional second parameter controls the precision, it defaults to | This template calculates the cent value of its argument (defaults to 1). An optional second parameter controls the precision, it defaults to 0 decimal places. | ||
<big>It requires the MediaWiki [https://www.mediawiki.org/wiki/Extension:NumberFormat Extension:NumberFormat] being [[Special:Version|installed]].</big> | <big>It requires the MediaWiki [https://www.mediawiki.org/wiki/Extension:NumberFormat Extension:NumberFormat] being [[Special:Version|installed]].</big> |