Fix l/100 km to MPG conversion

Authored by madcatx on Apr 14 2019, 3:54 PM.

Description

Fix l/100 km to MPG conversion

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.

BUG: 378967

Reviewers: broulik, Frameworks, aacid

Subscribers: apol, aacid, meven, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D20284

Details

Committed
aacidApr 14 2019, 3:59 PM
Differential Revision
D20284: Fix l/100 km to MPG conversion
Parents
R292:211f6a79abc4: GIT_SILENT Upgrade KF5 version to 5.58.0.
Branches
Unknown
Tags
Unknown