Использование
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
– Опциональный. Can be set to%
in order to return the results as percentages.
Примеры
{{Calculate|v1+5|v1=1/2/3}}
генерирует: 6/7/8.{{Calculate|v1*v2|v1=10/15/20/25|v2=0.25/0.5/0.75/1}}
генерирует: 2,5/7,5/15/25.{{Calculate|v1/3 round2|v1=2/4}}
генерирует: 0,67/1,33.{{Calculate|v1*80|v1=40%/70%/100%}}
генерирует: 32/56/80.{{Calculate|v1-v2|v1=100%/150%/200%/250%|v2=50%/75%/100%/125%|%}}
генерирует: 50%/75%/100%/125%.{{Calculate|(v1-0.3)/5*0.1|v1=1.75/2.5/3.25/4}}
генерирует: 0,029/0,044/0,059/0,074.{{Calculate|(v1-1)*12%|v1=125%/175%/225%/275%|%}}
генерирует: 3%/9%/15%/21%.
Данные шаблона
Use this template when calculating with one or more values in the form of a sequence.
Параметр | Описание | Тип | Статус | |
---|---|---|---|---|
Calculation | 1 | The calculation with v1, v2, ... in place of the levelled values.
| Строка | обязательный |
Value 1 | v1 | A levelled value with levels separated by a forward slash.
| Неизвестно | обязательный |
Value 2 | v2 | A levelled value with levels separated by a forward slash.
| Неизвестно | предложенный |
Percentage | 2 | Set this parameter to activate sprecial percentage handling. | Булево | необязательный |