Update of /cvsroot/ufraw/ufraw
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16593
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.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ufraw_lens_ui.c 17 Feb 2010 15:20:35 -0000 1.30
+++ ufraw_lens_ui.c 20 Feb 2010 05:00:11 -0000 1.31
@@ -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,
@@ -322,7 +325,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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs