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 GetBaseValue(Unit unit, decimal value) { return unit.GetBaseValue(value); }