Usage
Use this template when calculating with one or more values in the form of a sequence (e.g. 1/2/3).
{{Calculate|expr.|v1=|...|vn=|percent}}
expr.
– The intended calculation in the form of a mathematical expression, withv1...vn
representing the respective value sequences, e.g.v1+v2
. Supports percentages, e.g.v1*50%
, which is automatically converted tov1*0.5
. Follows the same rules as the parser function #expr.
v1,...,vn
– Each sequence of values has to be set as a separate parametervn
, with n representing its index number, e.g.v1=1/2/3
. Supports percentages, e.g.v1=1%/2%/3%
.
percent
– Optional. Can be set to%
in order to return the results as percentages.
Examples
{{Calculate|v1+5|v1=1/2/3}}
generates: 6/7/8.{{Calculate|v1*v2|v1=10/15/20/25|v2=0.25/0.5/0.75/1}}
generates: 2.5/7.5/15/25.{{Calculate|v1/3 round2|v1=2/4}}
generates: 0.67/1.33.{{Calculate|v1*80|v1=40%/70%/100%}}
generates: 32/56/80.{{Calculate|v1-v2|%|v1=100%/150%/200%/250%|v2=50%/75%/100%/125%}}
generates: 50%/75%/100%/125%.{{Calculate|(v1-0.3)/5*0.1|v1=1.75/2.5/3.25/4}}
generates: 0.029/0.044/0.059/0.074.{{Calculate|(v1-1)*12%|%|v1=125%/175%/225%/275%}}
generates: 3%/9%/15%/21%.
TemplateData
Use this template when calculating with one or more values in the form of a sequence.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Calculation | 1 | The calculation with v1, v2, ... in place of the levelled values.
| String | required |
Value 1 | v1 | A levelled value with levels separated by a forward slash.
| Unknown | required |
Value 2 | v2 | A levelled value with levels separated by a forward slash.
| Unknown | suggested |
Percentage | 2 | Set this parameter to activate sprecial percentage handling. | Boolean | optional |