Refactoring. Move VFuzzyComparePoints to VGeometry static library.
--HG-- branch : develop
This commit is contained in:
parent
d4a308af5b
commit
1ab19c05a3
|
@ -97,4 +97,12 @@ private:
|
||||||
};
|
};
|
||||||
Q_DECLARE_METATYPE(VLayoutPassmark)
|
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
|
#endif // VGEOMETRYDEF_H
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "vbestsquare.h"
|
#include "vbestsquare.h"
|
||||||
#include "vbestsquare_p.h"
|
#include "vbestsquare_p.h"
|
||||||
#include "../vmisc/def.h"
|
#include "../vgeometry/vgeometrydef.h"
|
||||||
|
|
||||||
#include <QMatrix>
|
#include <QMatrix>
|
||||||
|
|
||||||
|
|
|
@ -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).
|
* @brief The CustomSA struct contains record about custom seam allowanse (SA).
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user