Difference between revisions of "Template:Meat range"

From TheKolWiki
Jump to: navigation, search
m (curly braces of DOOOOOOOMMMM!)
m (Examples: there we go)
 
Line 8: Line 8:
 
*<nowiki>{{meat range}}</nowiki>
 
*<nowiki>{{meat range}}</nowiki>
 
{{meat range}}
 
{{meat range}}
 +
*&#123;{meat range|}}
 +
{{meat range|}}
 
*<nowiki>{{meat range|0}}</nowiki>
 
*<nowiki>{{meat range|0}}</nowiki>
 
{{meat range|0}}
 
{{meat range|0}}

Latest revision as of 23:06, 11 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|}}

unknown

  • {{meat range|0}}

None

  • {{meat range|1111}}

889-1,333

  • {{meat range|3}}

2-4