Exemplo n.º 1
0
 /// <summary>
 /// Converts a value from one Unit System to another Unit System
 /// </summary>
 /// <param name="value">Value to convert</param>
 /// <param name="fromUnit">Unit object</param>
 /// <param name="toUnit">Unit object</param>
 /// <returns name="double">Converted value</returns>
 public static double ConvertByUnits(double value, Unit fromUnit, Unit toUnit)
 {
     return(ForgeUnitsEngine.convert(value, fromUnit.TypeId, toUnit.TypeId));
 }
Exemplo n.º 2
0
 public static double ConvertByUnitIds(double value, string fromUnit, string toUnit)
 {
     return(ForgeUnitsEngine.convert(value, fromUnit, toUnit));
 }