Template:Percentage: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Frietjes
No edit summary
meta>Frietjes
use new lua version (works in the testcases, but will temporarily save the old version in the sandbox for comparison)
Line 1: Line 1:
<includeonly>{{ntsh|{{safesubst:#expr:100*({{safesubst:formatnum:{{{1|0}}}|R}})/({{safesubst:formatnum:{{{2|100}}}|R}})}}}}{{safesubst:#if:{{{sigfig|}}}
<includeonly>{{#invoke:Percentage|main|{{#expr:{{formatnum:{{{1|0}}}|R}}}}|{{#expr:{{formatnum:{{{2|100}}}|R}}}}|{{{3|}}}|pad={{{pad|}}}|sigfig={{{sigfig|}}}|%={{{%|%}}}
|{{safesubst:significant figures|100*({{safesubst:formatnum:{{{1|0}}}|R}})/({{safesubst:formatnum:{{{2|100}}}|R}}) | {{{sigfig|}}} }}
}}</includeonly><noinclude>
|{{safesubst:#if:{{{pad|}}}
  |{{safesubst:round|100*({{safesubst:formatnum:{{{1|0}}}|R}})/({{safesubst:formatnum:{{{2|100}}}|R}}) | {{{3|{{{pad}}}}}} }}
  |{{safesubst:#expr:100*({{safesubst:formatnum:{{{1|0}}}|R}})/({{safesubst:formatnum:{{{2|100}}}|R}}) round ({{{3|0}}}>=0)*{{{3|0}}}}}}}
}}{{{%|%}}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 14:34, 20 October 2019