Conversion calculations are defined in UnitConversion objects, which are child objects of the UnitConversionMap object. From and To attributes of the UnitConversion object match the Name attribute of the Unit object.
Conversion calculations defined in the units file
UnitConversion From attribute |
UnitConversion To attribute |
UnitConversion value |
---|---|---|
Length conversion |
|
|
in |
cm |
(value) * 2.54 |
in |
meter |
(value) * 0.0254 |
in |
km |
(value) * 2.54 / 100000 |
in |
mm |
(value) * 25.4 |
in |
foot |
(value) / 12 |
foot |
in |
(value) * 12 |
cm |
in |
(value) / 2.54 |
cm |
meter |
(value) / 100 |
cm |
km |
(value) / 100000 |
cm |
mm |
(value) * 10 |
cm |
foot |
(value) / 2.54 / 12 |
foot |
meter |
(value) * .3048 |
meter |
foot |
(value) * 3.2808 |
mm |
cm |
(value) / 10 |
mm |
in |
(value) / 25.4 |
Temperature conversions |
|
|
Cent |
Fahren |
({value} * 9/5) + 32 |
Fahren |
Cent |
({value} - 32) * 5 / 9 |
Weight conversions |
|
|
Pounds |
Kilogram |
(value) * 0.454 |
Kilogram |
Pounds |
(value) * 2.205 |
Ounce |
Gram |
(value) * 28.35 |
Gram |
Ounce |
(value) / 28.35 |
Copyright © 2007, 2016 Oracle and/or its affiliates. All rights reserved.