Use fuzzy functions to compare floats.
This commit is contained in:
parent
3e4b82b3cc
commit
02b21d818f
|
@ -30,6 +30,7 @@
|
|||
#include <QtMath>
|
||||
|
||||
#include "vpuzzlelayer.h"
|
||||
#include "../vmisc/def.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
|
@ -149,7 +150,7 @@ void VPuzzlePiece::SetRotation(qreal angle)
|
|||
|
||||
// m_transform.rotate(newAngle);
|
||||
|
||||
if(m_pieceAngle != angle)
|
||||
if(not VFuzzyComparePossibleNulls(m_pieceAngle, angle))
|
||||
{
|
||||
m_pieceAngle = angle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user