289
edits
Changes
no edit summary
<includeonlynoinclude>This tempalte allows for an easy way to convert units. To use the template place <nowiki>{{#ifeqconvert|</nowiki>'''Value 1'''|'''Value 2'''<nowiki>}}</nowiki>The first value given to the template, indicates what unit you are supplying (acceptable values are kg, lbs, g, oz, in, cm, mm). The Second parameter is the value you want to convert.=Examples===Ex 1==<div style="width: 400px; font-size:125%;"><pre>* '''Weight''':{{{sortableconvert|kg|5}}</pre></div>Produces:* '''Weight''': {{convert|kg|5}}==Ex 2==<div style="width: 400px; font-size:125%;"><pre>* '''Weight''': {{convert|onoz|25}}</pre></div>Produces:* '''Weight''': {{ntshconvert|oz|25}}==Ex 3==<div style="width: 400px; font-size:125%;"><pre>* '''Barrel Length''': {{FORMATNUMconvert|in|5}}</pre></div>Produces:* '''Barrel Length''':{{convert|in|5}}==Ex 4==<div style="width: 400px; font-size:125%;"><pre>* '''Barrel Length''': {{convert|cm|25.1}}}</pre></div>Produces:* '''Barrel Length''': {{convert|R}}cm|25.1}} ==Ex 5==If the parameter supplied is invalid (such as '''ccm''' no output will be displayed)<div style="width: 400px; font-size:125%;"><pre>* '''Barrel Length''': {{convert|ccm|25}}</pre></div>Produces:* '''Barrel Length''': {{convert|ccm|25}} [[Category:Template]]<!-- ALL LINE BREAKS MUST BE REMOVED FOR TEMPLATE TO PROPERLY WORK!!!!! --></noinclude><includeonly><!-- kg to lbs -->{{#ififeq:{{{1}}}|kg|{{#expr: ({{{2}}}* 2.2046)round1}}|lbs ({{FORMATNUM#expr:({{{12}}}|R)round1}}kg)|}}<!-- lbs to kg -->{{#ifeq:{{{1}}}|lbs|{{#expr:({{{3|02}}})round1}} lbs ({{#expr: ({{{2}}}*0.45359)round1}}kg)|0|0}}|<!-- oz to kg & lbs -->{{#ifeq: {3|{{1}}}|oz|{{#expr: ({4|{{2}}}|* 0.0625)round1}} lbs ({{#expr: ({5|{{2}}}* 0.0283495231)round1}} kg)|}}<!-- g to kg & lbs -->{{#ifeq: {6|{{1}}}|g|{{#expr: ({7|{{2}}}|* 0.00220462262)round1}} lbs ({{#expr: ({8|{{2}}}* 0.001)round1}} kg)|r=}}<!-- in to cm-->{{#ifeq:{{{sp1}}}|usin|er|re}}|d=L{{#expr: ({lk|off{{2}}}A)round1}} in ({{#switchexpr:({{{abbr2}}}|off=none|def=off|{{{abbr|off* 2.54)round1}}cm)|}}}D<!-- cm to in-->{{#ifeq: {disp|b{{1}}}S|cm|{{#expr: ({adj|{{{sing|off2}}}* 0.393700787)round1}}}|s=in ({{#expr: ({{sigfig|{2}}})round1}}</includeonly><noinclude>{{Documentationcm)|}}</noinclude><!--testing code followsmm to in & cm-->{{#ifeq:{{{disp1}}}|/mm|{{convert/und#expr: ({{{2}}}* 0.0393700787)round1}} in ({{convert/test/A#expr: ({{{abbr|2}}}* 0.1)round1}}cm)|}}</includeonly>