public interface UnitConverter
If rounding errors and truncation is ignored the following should
hold for any implementation:
value == converter.convertFrom(converter.convertTo(value))
Modifier and Type | Method and Description |
---|---|
double |
convertToReferenceUnit(double specificValue)
Convert a value from the specific unit to the reference unit.
|
double |
convertToSpecificUnit(double referenceValue)
Convert a value from the reference unit to the specific unit.
|
double convertToReferenceUnit(double specificValue)
specificValue
- The value to convertdouble convertToSpecificUnit(double referenceValue)
referenceValue
- The reference value