Bug 391860

Summary: Compare floating point numbers properly in libkwineffects
Product: [Plasma] kwin Reporter: Vlad Zahorodnii <vlad.zahorodnii>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kde.org, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.