public static decimal ConvertValue(Unit fromUnit, Unit toUnit, decimal value) { if (fromUnit.GetGroup() == toUnit.GetGroup()) { value = fromUnit.GetBaseValue(value); value = toUnit.GetUnitValue(value); } return value; }
public static decimal GetUnitValue(Unit unit, decimal value) { return unit.GetUnitValue(value); }