Update of /cvsroot/ufraw/ufraw In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24425
Modified Files: ufraw_lensfun.cc Log Message: Fix precision. Index: ufraw_lensfun.cc =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw_lensfun.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ufraw_lensfun.cc 27 Feb 2010 06:36:21 -0000 1.4 +++ ufraw_lensfun.cc 27 Feb 2010 14:30:07 -0000 1.5 @@ -64,10 +64,12 @@ // The criteria is to have 2 or 3 significant digits. int precision; if (number > 10.0 && (int)(10*number)%10 != 0) - // Support focal length such as 10.5mm fisheye. + // Support non-integer focal lengths longer than 10mm. precision = MAX(-floor(log(number) / log(10) - 1.99), 0); - else + else if (number > 0.0) precision = MAX(-floor(log(number) / log(10) - 0.99), 0); + else + precision = 0; snprintf(buffer, _buffer_size, "%.*f", precision, number); return buffer; } ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ ufraw-cvs mailing list ufraw-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ufraw-cvs