qt5base-lts/src/gui/math3d
Marc Mutz ec73b5d4b8 QQuaternion: prepare isNull(), isIdentity() for constexpr'ification
...by dropping the use of qIsNull(), which, in Qt 4, distinguished
between -0.0f and +0.0f.

But mathematically, whether x, y, z are ±0 doesn't change the fact
that the result is the identity element (x, y, z should contain the
identity element for addition and w the one for multiplication), or
the null element (additive identity).

So using qIsNull() was wrong even in Qt 4. In Qt 5, qIsNull() returns
true for both ±0, so we can just as well compare to 0.0f instead,
which allows to mark these functions constexpr (qIsNull() can't be).

Do so.

Change-Id: I78b1fa7890036dd3cb4de7f90b75d439f9835e73
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-05-04 13:49:27 +00:00
..
math3d.pri Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qgenericmatrix.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qgenericmatrix.h QGenericMatrix: remove one of two non-initializing ctors 2015-04-26 12:40:43 +00:00
qmatrix4x4.cpp Use QDebugStateSaver to restore space setting in stream operators. 2015-03-30 12:59:58 +00:00
qmatrix4x4.h Fix private member initialization for QMatrix4x4(Qt::Uninitialized) 2015-03-16 10:58:22 +00:00
qquaternion.cpp Introduce QQuaternion::fromDirection() 2015-04-07 13:07:48 +00:00
qquaternion.h QQuaternion: prepare isNull(), isIdentity() for constexpr'ification 2015-05-04 13:49:27 +00:00
qvector2d.cpp Use QDebugStateSaver to restore space setting in stream operators. 2015-03-30 12:59:58 +00:00
qvector2d.h Update copyright headers 2015-02-11 06:49:51 +00:00
qvector3d.cpp Use QDebugStateSaver to restore space setting in stream operators. 2015-03-30 12:59:58 +00:00
qvector3d.h Update copyright headers 2015-02-11 06:49:51 +00:00
qvector4d.cpp Use QDebugStateSaver to restore space setting in stream operators. 2015-03-30 12:59:58 +00:00
qvector4d.h Update copyright headers 2015-02-11 06:49:51 +00:00