qt5base-lts/tests/auto/corelib/global/qnumeric
Jan Arve Saether e37001aad7 Say hello to qFloatDistance()
This function is useful if a floating point comparison requires a
certain precision. The return value can be considered as the precision.
For instance, if you want to compare two 32-bit floating point values
and all you need is a 24-bit precision, you can use this function like
this:
if (qFloatDistance(a,b) < (1 << 7)) {   // The last 7 bits are not
                                        // significant
    // precise enough
}

Task-number: QTBUG-32632

Change-Id: I020a58d2f9f9452ac3c510b4bb560dc806f0d93c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-27 07:57:23 +02:00
..
.gitignore Moving relevant tests to corelib/global 2011-08-30 13:17:21 +02:00
qnumeric.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qnumeric.cpp Say hello to qFloatDistance() 2013-09-27 07:57:23 +02:00