diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-01-13 14:40:59 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-01-13 14:56:41 (GMT) |
commit | ae5812ee793999f78f725e10cb8d531cbd51782f (patch) | |
tree | 50e99f5c792de8be56d0e3fc9bbb20243c03c808 /examples/tools/regexp/main.cpp | |
parent | 58be75dec90afbda3c9640266708a7d5b30a1f50 (diff) | |
download | Qt-ae5812ee793999f78f725e10cb8d531cbd51782f.zip Qt-ae5812ee793999f78f725e10cb8d531cbd51782f.tar.gz Qt-ae5812ee793999f78f725e10cb8d531cbd51782f.tar.bz2 |
Replace the truncate function with fuzzierCompare().
truncate did a qRound of the two numbers, which could cause two numbers
that were close to become far away (e.g. (0.000049 and 0.000051 would
become 0 and 1 respectively)
fuzzierCompare allows less precision than qFuzzyCompare. This is because
the anchor layout engine can sometimes do quite a lot of calculations,
and the error will be larger than what the qFuzzyCompare checks for.
Thus, the factor in fuzzierCompare is not chosen due to mathematical
proof but rather it is just chosen by what is acceptable.
(actually it can still be larger and still be acceptable)
Diffstat (limited to 'examples/tools/regexp/main.cpp')
0 files changed, 0 insertions, 0 deletions