Template:Range: Difference between revisions

From Vintage Story Wiki
m (docs)
(Translate tags and Template:Documentation)
Line 1: Line 1:
<includeonly>{{#if: {{{2}}}
<noinclude><languages /></noinclude><includeonly>{{#if: {{{2}}}
  |{{#expr: {{{1}}} - {{{2}}} }} - {{#expr: {{{1}}} + {{{2}}} }}
  |{{#expr: {{{1}}} - {{{2}}} }} - {{#expr: {{{1}}} + {{{2}}} }}
  |{{{1}}}
  |{{{1}}}
}}{{Hovertip|*|2.5 means 2 + 50% chance}}</includeonly><noinclude>
}}{{Hovertip|*|<translate>2.5 means 2 + 50% chance</translate>}}</includeonly><noinclude>
{| class="wikitable"
{{Documentation}}
|-
! Parameter !! Required or Optional, default if applicable !! Example
|-
| Unnamed 1, Average || Required || 2.3
|-
| Unnamed 2, Variance || Optional || 1.2
|}
 
Use when you want to show a range of values without doing math. <code><nowiki>{{Range|2.3|1.2}}</nowiki></code> turns into <code>{{Range|2.3|1.2}}</code>.
</noinclude>
</noinclude>

Revision as of 11:05, 21 November 2023

Other languages:
[view | edit | history | purge this page]Documentation

Use when you want to show a range of values without doing math.

Template parameters

ParameterDescriptionTypeStatus
Average1

no description

Example
2.3
Numberrequired
Variance2

no description

Example
1.2
Numberoptional

Usage

{{Range|2.3|1.2}}

Examples

{{Range|2.3|1.2}} turns into 1.1 - 3.5*.

[view | edit | history | purge this page]The above documentation is transcluded from Template:Range/doc.