In utils.UnitConverter.time() we check whether the time unit is in fact a denominator rather than a numerator, and act upon it, by:
if (timeUnit.contains(unit+"-1")) {out = 1d/out;}
Which makes perfect sense, and the equivalent process is also in the mass converter.
However, in the length and volume converters we check only for the negative:
if (lengthUnit.contains(unit+"-")) {out = 1d/out;}
This is fragile and a potential source of errors!
In utils.UnitConverter.time() we check whether the time unit is in fact a denominator rather than a numerator, and act upon it, by:
if (timeUnit.contains(unit+"-1")) {out = 1d/out;}Which makes perfect sense, and the equivalent process is also in the mass converter.
However, in the length and volume converters we check only for the negative:
if (lengthUnit.contains(unit+"-")) {out = 1d/out;}This is fragile and a potential source of errors!