Difference between revisions of "Template:Meat range"

From TheKolWiki
Jump to: navigation, search
m
m
Line 1: Line 1:
<includeonly>{{#switch:{{{1|?}}}|!=Indeterminate|?=''unknown''|0|none|None=None|#default={{formatnum:{{ceiling|{{#expr:.8*{{{1}}}}}}}}}-{{formatnum:{{floor|{{#expr:1.2*{{{1}}}}}}}}}}}}}</includeonly><noinclude>
+
<includeonly>{{#switch:{{{1|?}}}|!=Indeterminate|?=''unknown''|0|none|None=None|#default={{formatnum:{{ceiling|{{#expr:.8*{{{1}}}}}}}}}-{{formatnum:{{floor|{{#expr:1.2*{{{1}}}}}}}}}}}</includeonly><noinclude>
 
{{Code2}}
 
{{Code2}}
 
Helper template for constructing a range of meat drops from the given average.  Can be used for other things, provided they are triangular and range from 80% to 120% of the average value (round up and down respectively).
 
Helper template for constructing a range of meat drops from the given average.  Can be used for other things, provided they are triangular and range from 80% to 120% of the average value (round up and down respectively).

Revision as of 07:44, 7 August 2011

{{Meat range}}
{{#switch:{{{1|?}}}|!=Indeterminate|?|=''unknown''|0|none|None=None|#default={{formatnum:{{min|{{#expr:{{{1}}}-1}}|{{#expr:ceil (.8*{{{1}}})}}}}}}-{{formatnum:{{max|{{#expr:{{{1}}}+1}}|{{#expr:floor (1.2*{{{1}}})}}}}}}}}

Helper template for constructing a range of meat drops from the given average. Can be used for other things, provided they are triangular and range from 80% to 120% of the average value (round up and down respectively).

Examples

  • {{meat range|30}}

24-36

  • {{meat range}}

unknown

  • {{meat range|0}}

None

  • {{meat range|1111}}

889-1,333