summaryrefslogtreecommitdiff
path: root/src/org/unitConverter/converterGUI
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/unitConverter/converterGUI')
-rwxr-xr-xsrc/org/unitConverter/converterGUI/UnitConverterGUI.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/unitConverter/converterGUI/UnitConverterGUI.java b/src/org/unitConverter/converterGUI/UnitConverterGUI.java
index e258c6f..2d3d1a5 100755
--- a/src/org/unitConverter/converterGUI/UnitConverterGUI.java
+++ b/src/org/unitConverter/converterGUI/UnitConverterGUI.java
@@ -191,7 +191,7 @@ final class UnitConverterGUI {
return;
}
final double beforeValue = Double.parseDouble(input);
- final double value = to.convertFromBase(from.convertToBase(beforeValue));
+ final double value = from.convertTo(to, beforeValue);
final String output = this.getRoundedString(value);
@@ -254,7 +254,7 @@ final class UnitConverterGUI {
return;
}
- value = to.convertFromBase(from.convertToBase(1));
+ value = from.convertTo(to, 1);
// round value
final String output = this.getRoundedString(value);