/// <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)); }
public static double ConvertByUnitIds(double value, string fromUnit, string toUnit) { return(ForgeUnitsEngine.convert(value, fromUnit, toUnit)); }