|
|
(35 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| <!-- {{#number_format:{{#expr: 1200*ln({{{1|{{{ratio|1}}}}}})/ln(2)}}|{{{2|{{{precision|0}}}}}}|.|}}<noinclude>
| | {{<includeonly>subst:</includeonly>#number_format: {{<includeonly>subst:</includeonly>#expr: 1200 * ln({{<includeonly>subst:</includeonly>#rmatch: {{{1|{{{ratio|1}}}}}}|^(.*?)[Cc]?$|\1}}) / ln(2)}}|{{{2|{{{prec|0}}}}}}|.|}}{{<includeonly>subst:</includeonly>#switch: {{<includeonly>subst:</includeonly>#rmatch: {{{1|{{{ratio|1}}}}}}|^.*?([Cc]?)$|\1}}|c={{c}}|C={{cent}}|#default=}}<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.
| | {{documentation}} |
|
| |
|
| <big>It requires the MediaWiki [https://www.mediawiki.org/wiki/Extension:NumberFormat Extension:NumberFormat] being [[Special:Version|installed]].</big>
| | [[Category:Functionality templates]] |
| | |
| [[Category:Templates]]
| |
| </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.
| |
| | |
| <big>'''This is a temporary solution.'''</big>
| |
| | |
| It doesn't care for dangling zeros, exactly following [http://php.net/manual/en/function.round.php PHP's round function].
| |
| | |
| [[Category:Templates]] | |
| </noinclude> | | </noinclude> |