Difference between revisions of "Template:Average"
Jump to navigation
Jump to search
imported>Primefac (already a module that does this) |
imported>Alex 21 (Adding rounding parameter) |
||
| Line 1: | Line 1: | ||
| − | {{#invoke:math|average}}<noinclude>{{doc}}</noinclude> | + | {{#if:{{{round|}}}|{{round|{{#invoke:math|average}}|{{{round|}}}}}|{{#invoke:math|average}}}}<noinclude>{{doc}}</noinclude> |
Revision as of 15:27, 13 October 2020
0
| This template uses Lua: |
This template is used to find the average (default mean) of a series of numbers.
Parameters
Parameters with a number as the value are the numbers to find the average of.
Examples
{{Average|10|20|30|40|100000000}} → 20000020
{{Average|10|20|30|40|50|100000000}} → 16666691.666667
{{Average|10|20|30|40|50|100000000|round=2}} → Template:Round
See also
- {{Median}}
| The above documentation is transcluded from Template:Average/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. |