Bug 391860 - Compare floating point numbers properly in libkwineffects
Summary: Compare floating point numbers properly in libkwineffects
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-14 17:45 UTC by Vlad Zahorodnii
Modified: 2021-11-06 20:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2018-03-14 17:45:21 UTC
WindowQuad, WindowQuadList, and WindowMotionManager use '==' to compare floating point numbers, this is completely wrong. 

Please note, we can't use qFuzzyCompare because it doesn't work if one of numbers is 0.

For reference, Boost's docs on floating point comparison.

http://www.boost.org/doc/libs/1_61_0/libs/math/doc/html/math_toolkit/float_comparison.html
Comment 1 kde.org 2021-11-06 20:13:13 UTC
Still present in KDE 5.24.