Difference between revisions of "Template:Average"
From Istaria Lexica
Line 1: | Line 1: | ||
{{#if: {{{1|}}} | {{#if: {{{2|}}} | {{#expr:{{#expr: {{{1}}} + {{{2}}}}} / 2 round 0}} | {{{1|}}}{{{2|}}}}} | {{{1|}}}{{{2|}}}}} | {{#if: {{{1|}}} | {{#if: {{{2|}}} | {{#expr:{{#expr: {{{1}}} + {{{2}}}}} / 2 round 0}} | {{{1|}}}{{{2|}}}}} | {{{1|}}}{{{2|}}}}} | ||
− | <noinclude> | + | <noinclude>{{Documentation}}[[Category:Utility Templates]]</noinclude> |
Latest revision as of 21:41, 3 October 2022
Template documentation (for the template shown above, sometimes hidden or invisible)
Description[edit]
Calculates an average of two provided numbers and rounds it to the next near integer.
- If only one parameter provided, return this
- If no parameters provided, return nothing
Syntax / Example[edit]
{{Average|5122|8129}}
Results in...
6626
Visit Template:Average/doc to edit this text. (How to: document correctly)