diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-04-24 10:24:44 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-05-04 13:49:27 +0000 |
commit | ec73b5d4b83df954ea68076c51e8ab6a85477a0d (patch) | |
tree | b6adc3e754a3ee8f70700c2afc8db6bcc53b273c /src/gui/painting/qpainterpath.h | |
parent | cecd52b89ae6c58476c39079830908d22f52ef2d (diff) |
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>
Diffstat (limited to 'src/gui/painting/qpainterpath.h')
0 files changed, 0 insertions, 0 deletions