Refactoring. Move VFuzzyComparePoints to VGeometry static library.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-21 15:04:08 +03:00
parent d4a308af5b
commit 1ab19c05a3
3 changed files with 9 additions and 9 deletions

View file

@ -97,4 +97,12 @@ private:
};
Q_DECLARE_METATYPE(VLayoutPassmark)
constexpr qreal accuracyPointOnLine = (0.12/*mm*/ / 25.4) * PrintDPI;
Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2);
static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2)
{
return QLineF(p1, p2).length() <= accuracyPointOnLine;
}
#endif // VGEOMETRYDEF_H

View file

@ -28,7 +28,7 @@
#include "vbestsquare.h"
#include "vbestsquare_p.h"
#include "../vmisc/def.h"
#include "../vgeometry/vgeometrydef.h"
#include <QMatrix>

View file

@ -642,14 +642,6 @@ Q_DECL_RELAXED_CONSTEXPR static inline bool VFuzzyComparePossibleNulls(double p1
}
}
constexpr qreal accuracyPointOnLine = (0.12/*mm*/ / 25.4) * PrintDPI;
Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2);
static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2)
{
return QLineF(p1, p2).length() <= accuracyPointOnLine;
}
/**
* @brief The CustomSA struct contains record about custom seam allowanse (SA).
*/