D20284: Fix l/100 km to MPG conversion

Michal MalĂ˝ noreply at phabricator.kde.org
Mon Apr 8 03:56:45 BST 2019


madcatx added inline comments.

INLINE COMMENTS

> apol wrote in fuel_efficiency.cpp:36
> I'm not sure I understand what isReciprocal means here.

l/100 km (amount of fuel needed to cross a given distance) is reciprocal to MPG (distance crossed with a given amount of fuel). KUnitConverter can only scale units by a given factor, not invert them which is what is needed to make this work. `isReciprocal` flag denotes that the conversion between the base unit (l/100 km) and the target unit shall be reciprocal.

REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D20284

To: madcatx, broulik, #frameworks, aacid
Cc: apol, aacid, meven, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190408/4f13b614/attachment.html>


More information about the Kde-frameworks-devel mailing list