Difference between revisions of "Template:Measconv"

From Illomi wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
<includeonly>{{#vardefine:var}}{{
 
<includeonly>{{#vardefine:var}}{{
 
#switch:{{{source}}}
 
#switch:{{{source}}}
| reung={{#vardefine:var|{{#expr: {{{measure}}}*1142.1 round0 }}}}
+
| reung={{#vardefine:var|{{#expr: {{{measure}}}*1142.1 }}}}
| mest={{#vardefine:var|{{#expr: {{{measure}}}*38.07 round0 }}}}
+
| mest={{#vardefine:var|{{#expr: {{{measure}}}*38.07 }}}}
| fiqj={{#vardefine:var|{{#expr: {{{measure}}}*33.84 round0 }}}}
+
| fiqj={{#vardefine:var|{{#expr: {{{measure}}}*33.84 }}}}
| wall={{#vardefine:var|{{#expr: {{{measure}}}*12.69 round0 }}}}
+
| wall={{#vardefine:var|{{#expr: {{{measure}}}*12.69 }}}}
| metre={{#vardefine:var|{{#expr: {{{measure}}}*0.846 round0 }}}}
+
| metre={{#vardefine:var|{{#expr: {{{measure}}}*0.846 }}}}
| braz={{#vardefine:var|{{#expr: {{{measure}}}*0.423 round0 }}}}
+
| braz={{#vardefine:var|{{#expr: {{{measure}}}*0.423 }}}}
| riqj={{#vardefine:var|{{#expr: {{{measure}}}*0.18 round0 }}}}
+
| riqj={{#vardefine:var|{{#expr: {{{measure}}}*0.18 }}}}
| pawz={{#vardefine:var|{{#expr: {{{measure}}}*0.045 round0 }}}}
+
| pawz={{#vardefine:var|{{#expr: {{{measure}}}*0.045 }}}}
| ong={{#vardefine:var|{{#expr: {{{measure}}}*0.018 round0 }}}}
+
| ong={{#vardefine:var|{{#expr: {{{measure}}}*0.018 }}}}
| lunu={{#vardefine:var|{{#expr: {{{measure}}}*0.003 round0 }}}}
+
| lunu={{#vardefine:var|{{#expr: {{{measure}}}*0.003 }}}}
| inch={{#vardefine:var|{{#expr: {{{measure}}}*0.0254 round0 }}}}
+
| inch={{#vardefine:var|{{#expr: {{{measure}}}*0.0254 }}}}
| foot={{#vardefine:var|{{#expr: {{{measure}}}*0.3048 round0 }}}}
+
| foot={{#vardefine:var|{{#expr: {{{measure}}}*0.3048 }}}}
| yard={{#vardefine:var|{{#expr: {{{measure}}}*0.9144 round0 }}}}
+
| yard={{#vardefine:var|{{#expr: {{{measure}}}*0.9144 }}}}
| mile={{#vardefine:var|{{#expr: {{{measure}}}/0.000621371192 round0 }}}}
+
| mile={{#vardefine:var|{{#expr: {{{measure}}}/0.000621371192 }}}}
| mm={{#vardefine:var|{{#expr: {{{measure}}}/1000 round0 }}}}
+
| mm={{#vardefine:var|{{#expr: {{{measure}}}/1000 }}}}
| cm={{#vardefine:var|{{#expr: {{{measure}}}/100 round0 }}}}
+
| cm={{#vardefine:var|{{#expr: {{{measure}}}/100 }}}}
| km={{#vardefine:var|{{#expr: {{{measure}}}*1000 round0 }}}}
+
| km={{#vardefine:var|{{#expr: {{{measure}}}*1000 }}}}
 
| m={{#vardefine:var|{{{measure}}}}}
 
| m={{#vardefine:var|{{{measure}}}}}
 
}}{{
 
}}{{
 
#switch:{{{target}}}
 
#switch:{{{target}}}
| inch={{#vardefine:var|{{#expr: {{#var:var}}/0.0254 round0 }}}}
+
| inch={{#vardefine:var|{{#expr: {{#var:var}}/0.0254 }}}}
| foot={{#vardefine:var|{{#expr: {{#var:var}}/0.3048 round0 }}}}
+
| foot={{#vardefine:var|{{#expr: {{#var:var}}/0.3048 }}}}
| yard={{#vardefine:var|{{#expr: {{#var:var}}/0.9144 round0 }}}}
+
| yard={{#vardefine:var|{{#expr: {{#var:var}}/0.9144 }}}}
| mile={{#vardefine:var|{{#expr: {{#var:var}}*0.000621371192 round0 }}}}
+
| mile={{#vardefine:var|{{#expr: {{#var:var}}*0.000621371192 }}}}
| mm={{#vardefine:var|{{#expr: {{#var:var}}*1000 round0 }}}}
+
| mm={{#vardefine:var|{{#expr: {{#var:var}}*1000 }}}}
| cm={{#vardefine:var|{{#expr: {{#var:var}}*100 round0 }}}}
+
| cm={{#vardefine:var|{{#expr: {{#var:var}}*100 }}}}
| km={{#vardefine:var|{{#expr: {{#var:var}}/1000 round0 }}}}
+
| km={{#vardefine:var|{{#expr: {{#var:var}}/1000 }}}}
| reung={{#vardefine:var|{{#expr: {{#var:var}}/1142.1 round0 }}}}
+
| reung={{#vardefine:var|{{#expr: {{#var:var}}/1142.1 }}}}
| mest={{#vardefine:var|{{#expr: {{#var:var}}/38.07 round0 }}}}
+
| mest={{#vardefine:var|{{#expr: {{#var:var}}/38.07 }}}}
| fiqj={{#vardefine:var|{{#expr: {{#var:var}}/33.84 round0 }}}}
+
| fiqj={{#vardefine:var|{{#expr: {{#var:var}}/33.84 }}}}
| wall={{#vardefine:var|{{#expr: {{#var:var}}/12.69 round0 }}}}
+
| wall={{#vardefine:var|{{#expr: {{#var:var}}/12.69 }}}}
| metre={{#vardefine:var|{{#expr: {{#var:var}}/0.846 round0 }}}}
+
| metre={{#vardefine:var|{{#expr: {{#var:var}}/0.846 }}}}
| braz={{#vardefine:var|{{#expr: {{#var:var}}/0.423 round0 }}}}
+
| braz={{#vardefine:var|{{#expr: {{#var:var}}/0.423 }}}}
| riqj={{#vardefine:var|{{#expr: {{#var:var}}/0.18 round0 }}}}
+
| riqj={{#vardefine:var|{{#expr: {{#var:var}}/0.18 }}}}
| pawz={{#vardefine:var|{{#expr: {{#var:var}}/0.045 round0 }}}}
+
| pawz={{#vardefine:var|{{#expr: {{#var:var}}/0.045 }}}}
| ong={{#vardefine:var|{{#expr: {{#var:var}}/0.018 round0 }}}}
+
| ong={{#vardefine:var|{{#expr: {{#var:var}}/0.018 }}}}
| lunu={{#vardefine:var|{{#expr: {{#var:var}}/0.003 round0 }}}}
+
| lunu={{#vardefine:var|{{#expr: {{#var:var}}/0.003 }}}}
 
}} {{#var:var}}</includeonly><noinclude>
 
}} {{#var:var}}</includeonly><noinclude>
 
Usage:
 
Usage:

Revision as of 14:33, 1 March 2013

Usage:

{{Measconv
  |target=   Target measurement
  |source=   Source measurement
  |measure=  Measurement
 }}

The following measurement units are available for target and source: From our world: inch, foot, yard, mile, mm, cm, km, and m, and from Illte: reung, mest, fiqj, wall, metre, braz, riqj, pawz, ong, and lunu.

Examples:

{{Measconv|target=braz|source=ong|measure=37}} = 1.5744680851064
{{Measconv|target=mile|source=reung|measure=1}} = 0.70966803865426
{{Measconv|target=reung|source=mile|measure=1}} = 1.409109535067
{{Measconv|target=inch|source=pawz|measure=1}} = 1.7716535433071
{{Measconv|target=pawz|source=inch|measure=1}} = 0.56444444444444