MCPcopy Create free account
hub / github.com/KDE/okular / documentViewportFuzzyCompare

Function documentViewportFuzzyCompare

core/bookmarkmanager.cpp:69–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67};
68
69static inline bool documentViewportFuzzyCompare(const DocumentViewport &vp1, const DocumentViewport &vp2)
70{
71 bool equal = vp1.isValid() && vp2.isValid() && (vp1.pageNumber == vp2.pageNumber) && (vp1.rePos.pos == vp2.rePos.pos);
72
73 if (!equal) {
74 return false;
75 }
76
77 if (qAbs(vp1.rePos.normalizedX - vp2.rePos.normalizedX) >= 0.000001) {
78 return false;
79 }
80
81 if (qAbs(vp1.rePos.normalizedY - vp2.rePos.normalizedY) >= 0.000001) {
82 return false;
83 }
84
85 return true;
86}
87
88static inline bool bookmarkLessThan(const KBookmark &b1, const KBookmark &b2)
89{

Callers 2

bookmarkMethod · 0.85
addBookmarkMethod · 0.85

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected