summaryrefslogtreecommitdiff
path: root/src/org/unitConverter/UnitsDatabase.java
diff options
context:
space:
mode:
authorAdrien Hopkins <adrien.p.hopkins@gmail.com>2019-04-13 12:17:14 -0400
committerAdrien Hopkins <adrien.p.hopkins@gmail.com>2019-04-13 12:17:14 -0400
commite0c5021a9ba85debf0c0722d78f75a0dbcc8376b (patch)
treefff7da15995839b099f1e5b66111e94da9b9b3b2 /src/org/unitConverter/UnitsDatabase.java
parent8e613844ae19a4dea2089ac34c1f0ae650eaeae7 (diff)
Implemented the dimension-based converter.
Also added a search box list, and fixed a bug with dimension exponentiation.
Diffstat (limited to 'src/org/unitConverter/UnitsDatabase.java')
-rwxr-xr-xsrc/org/unitConverter/UnitsDatabase.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/unitConverter/UnitsDatabase.java b/src/org/unitConverter/UnitsDatabase.java
index 626f145..c3d3131 100755
--- a/src/org/unitConverter/UnitsDatabase.java
+++ b/src/org/unitConverter/UnitsDatabase.java
@@ -65,7 +65,7 @@ public final class UnitsDatabase {
final double exponent = exponentUnit.getConversionFactor();
if (DecimalComparison.equals(exponent % 1, 0))
// then exponentiate
- return base.toExponent((int) (exponent % 1 + 0.5));
+ return base.toExponent((int) (exponent + 0.5));
else
// not an integer
throw new UnsupportedOperationException("Decimal exponents are currently not supported.");