Difference between revisions of "Template:Average change"
Jump to navigation
Jump to search
({{val}}) |
(Formatting with fixed precision) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{ | + | <includeonly>{{round|{{#switch: {{{class|}}} |
|actual={{#switch: {{{type|}}} | |actual={{#switch: {{{type|}}} | ||
|d|decrease={{#switch: {{#invoke:ParameterCount|main|pattern1=%d}} | |d|decrease={{#switch: {{#invoke:ParameterCount|main|pattern1=%d}} | ||
| Line 37: | Line 37: | ||
}} | }} | ||
|{{font color|red|Error: Class not specified or invalid}} | |{{font color|red|Error: Class not specified or invalid}} | ||
| − | }}}}</includeonly><noinclude> | + | }}|2}}</includeonly><noinclude> |
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 22:48, 1 March 2020
| This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
Contents
Usage
{{Average change|Value 1|Value 2|Value 3 (optional)|Value 4 (optional)|Value 5 (optional)|Class|Type}}
This template is used for calculating the average change (increase or decrease) of a given collection of numerical values, up to a maximum of 5.
Parameters
|class=actual OR percent, mandatory, specifies whether the output should work out an actual average change or the equivalent percentage change|type=decrease OR d, optional, defines whether the calculated change should be calculated as a decrease (default is increase)
| The above documentation is transcluded from Template:Average change/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |