[Gdal-dev] precision pitfall

Marc A. Lepage mlepage at pyxisinnovation.com
Mon Apr 10 11:31:09 EDT 2006



> Using (int)x or floor(x) to get the whole-number degrees will be 59. 
> Turns out there are thirteen double-precision numbers that printf()
(and 
> the VC debugger) will report as 60 that are slightly less than 60.

Try rounding (the double) instead of truncating...?

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.0/306 - Release Date: 4/9/2006
 




More information about the Gdal-dev mailing list