[Development] Changing qreal to a float

Thiago Macieira thiago.macieira at intel.com
Wed Feb 15 14:45:18 CET 2012


On quarta-feira, 15 de fevereiro de 2012 12.33.18, lars.knoll at nokia.com wrote:
> Just a small nitpick: You won't end up on the wrong side of the river. The
> earth has a diameter of around 40000km. With 24 bits precision, you end up
> with a jitter of just above 2m. You might get wet feet though ;-)

#define __FLT_EPSILON__ 1.19209289550781250000e-7F

Multiply that by 360 (degrees in a latitude) and we've got and error of 0.15". 
Multiply it by the circumference (not the diameter) at the equator of 
40,075,017 m and we have 4.77m.

That's just one coordinate. The error accumulates with successive operations.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120215/435ecb36/attachment.sig>


More information about the Development mailing list