Review Request: KColorSpace::KHCY::KHCY(const & QColor) constructor floating point precision error
Oswald Buddenhagen
ossi at kde.org
Thu Jun 25 14:48:24 BST 2009
On Thu, Jun 25, 2009 at 03:06:26PM +0200, BenoƮt Jacob wrote:
> *** Can I use qFuzzyCompare to check if a number is close to zero?
>
> Never use qFuzzyCompare directly to check whether a number is
> approximately zero. Doing
> qFuzzyCompare(p,0)
> expands to
> return (qAbs(p) <= 0);
> which is an exact comparison, it's basically the same as "p == 0" !
>
fwiw, qt master has qFuzzyIsNull() (or some similar name).
More information about the kde-core-devel
mailing list