madcatx created this revision. madcatx added a reviewer: broulik. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. madcatx requested review of this revision.
REVISION SUMMARY Previous code (probably) worked only for l/100 km -> MPG but not the other way around. Fix this by using reciprocal conversion when necessary. Output: 38.7 MPG -> 6.077 l/100 km; 16.455 km/l; 46.482 MPGI 16.455 km/l -> 6.077 l/100 km; 38.7 MPG 46.48 MPGI -> 6.077 l/100 km Seems good to me. Fixes bug 378967 REPOSITORY R292 KUnitConversion REVISION DETAIL https://phabricator.kde.org/D20284 AFFECTED FILES src/fuel_efficiency.cpp To: madcatx, broulik Cc: kde-frameworks-devel, michaelh, ngraham, bruns