summaryrefslogtreecommitdiff
path: root/src/org/unitConverter/converterGUI/UnitConverterGUI.java
diff options
context:
space:
mode:
authorAdrien Hopkins <adrien.p.hopkins@gmail.com>2019-05-22 17:32:40 -0400
committerAdrien Hopkins <adrien.p.hopkins@gmail.com>2019-05-22 17:32:40 -0400
commit987fd8406d65505aedecd17e51216eb0ce393fbb (patch)
treeb10a551a57cbd099450ffe539cb8d6d8e230459d /src/org/unitConverter/converterGUI/UnitConverterGUI.java
parent50a195ef78af5d15dd6e548d4d6928c281bbaac2 (diff)
Added new default methods to the Unit interface.
Diffstat (limited to 'src/org/unitConverter/converterGUI/UnitConverterGUI.java')
-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);