[GRASS-SVN] r44635 - grass/branches/develbranch_6/raster/r.what.color

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 19 21:04:40 EST 2010


Author: hamish
Date: 2010-12-19 18:04:40 -0800 (Sun, 19 Dec 2010)
New Revision: 44635

Modified:
   grass/branches/develbranch_6/raster/r.what.color/main.c
Log:
show input value to full precision (or near enough)

Modified: grass/branches/develbranch_6/raster/r.what.color/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.what.color/main.c	2010-12-19 22:13:38 UTC (rev 44634)
+++ grass/branches/develbranch_6/raster/r.what.color/main.c	2010-12-20 02:04:40 UTC (rev 44635)
@@ -53,10 +53,10 @@
 	    return 0;
 	}
 	if (!G_get_d_raster_color(&fval, &red, &grn, &blu, colors)) {
-	    fprintf(stdout, "%f: *\n", fval);
+	    fprintf(stdout, "%.15g: *\n", fval);
 	    return 0;
 	}
-	fprintf(stdout, "%f: ", fval);
+	fprintf(stdout, "%.15g: ", fval);
 	fprintf(stdout, fmt, red, grn, blu);
 	fprintf(stdout, "\n");
 	return 1;



More information about the grass-commit mailing list