D20284: Fix l/100 km to MPG conversion

Michal Malý noreply at phabricator.kde.org
Sat Apr 6 07:46:02 BST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190406/87ced9dc/attachment.html>


More information about the Kde-frameworks-devel mailing list