Difference between revisions of "ConvertMass"

From Sega Retro

(Created page with "<includeonly><span style="display:none;">{{#vardefine:mvalue|}}{{#vardefine:munit|}}{{#vardefine:ivalue|}}{{#vardefine:iunit|}}{{#vardefine:pounds|}}{{#vardefine:ounces|}}{{#v...")
 
Line 19: Line 19:
 
{{#vardefine:mvalue|{{#expr:{{#expr:{{#var:pounds}} * 453.592}} + {{#expr:{{#var:ounces}} * 28.3495}}}}}}
 
{{#vardefine:mvalue|{{#expr:{{#expr:{{#var:pounds}} * 453.592}} + {{#expr:{{#var:ounces}} * 28.3495}}}}}}
 
{{MetricFormat|{{#var:mvalue}}|g}}
 
{{MetricFormat|{{#var:mvalue}}|g}}
|}}}}{{#vardefine:ivalue|{{#ifeq:{{#var:pounds}}|0||{{#var:pounds}}lb}} {{#expr:{{#var:ounces}} round 3}}oz}}</span>{{#var:mvalue}} {{#var:munit}} ({{#var:ivalue}})</includeonly><noinclude>
+
|}}}}{{#vardefine:ivalue|{{#ifeq:{{#var:pounds}}|0||{{#var:pounds}}lb}} {{#expr:{{#var:ounces}} round 3}}oz}}</span>{{#expr:{{#var:mvalue}} round 3}} {{#var:munit}} ({{#var:ivalue}})</includeonly><noinclude>
 
Converts and displays distances. Metric gets priority because most of the world uses it.
 
Converts and displays distances. Metric gets priority because most of the world uses it.
  

Revision as of 09:23, 22 December 2017

Converts and displays distances. Metric gets priority because most of the world uses it.

Metric

  • 1.234 -> 1.234 g (0.044oz)
  • 1234.234 -> 1.234 kg (2lb 11.536oz)
  • 0.1234 -> 123.4 mg (0.004oz)
  • 0.0001234 -> 123.4 μg (0oz)
  • 0.0000001234 -> 123.4 ng (0oz)

Imperial

  • 5lb3oz -> 2.353 kg (5lb 3oz)
  • 5lb -> 2.268 kg (5lb 0oz)
  • 3.5oz -> 99.223 g (3.5oz)
  • 34245lb3oz -> 15533.343 kg (34245lb 3oz)