Template:Meat range

From TheKolWiki
Jump to: navigation, search
{{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