Update of /cvsroot/ufraw/ufraw
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2193

Modified Files:
        ufraw_lens_ui.c 
Log Message:
Fix precision to display the correct focal length for e.g. a 10.5mm fisheye.

Index: ufraw_lens_ui.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_lens_ui.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ufraw_lens_ui.c     21 Feb 2010 10:03:55 -0000      1.32
+++ ufraw_lens_ui.c     21 Feb 2010 11:45:08 -0000      1.33
@@ -55,10 +55,13 @@
 
 /* simple function to compute the floating-point precision
    which is enough for "normal use". The criteria is to have
-   about 2 significant digits. */
+   2 or 3 significant digits. */
 static int precision(double x)
 {
-    return MAX(-floor(log(x) / log(10) - 0.99), 0);
+    if (x > 10.0 && (int)(10*x)%10 != 0)
+       return MAX(-floor(log(x) / log(10) - 1.99), 0);
+    else
+       return MAX(-floor(log(x) / log(10) - 0.99), 0);
 }
 
 static GtkComboBoxEntry *combo_entry_numeric(GtkWidget *container,
@@ -284,7 +287,7 @@
     };
     static gdouble aperture_values[] = {
        1, 1.2, 1.4, 1.7, 2, 2.4, 2.8, 3.4, 4, 4.8, 5.6, 6.7,
-       8, 9.5, 11, 13, 16, 19, 22, 27, 32, 38
+       8, 9.5, 11, 13, 16, 19, 22, 27, 32, 38, 45
     };
 
     if (lens == NULL) {


------------------------------------------------------------------------------
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

Reply via email to