about summary refs log tree commit diff
path: root/analyzer/pgmtexture.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-01-12 16:24:38 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-01-12 16:24:38 +0000
commit78c0c999ea9da2a7dfa65d3529de72e7844072ec (patch)
treeee1418c04d7c3f6e6317aa1789d063c237abb03f /analyzer/pgmtexture.c
parentbfa8d45af582be810e67a0b46f6eb39525ed85dc (diff)
downloadnetpbm-mirror-78c0c999ea9da2a7dfa65d3529de72e7844072ec.tar.gz
netpbm-mirror-78c0c999ea9da2a7dfa65d3529de72e7844072ec.tar.xz
netpbm-mirror-78c0c999ea9da2a7dfa65d3529de72e7844072ec.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1622 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'analyzer/pgmtexture.c')
-rw-r--r--analyzer/pgmtexture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c
index 76f66c6c..5d618f05 100644
--- a/analyzer/pgmtexture.c
+++ b/analyzer/pgmtexture.c
@@ -723,7 +723,7 @@ f10_dvar (float **     const p,
     /* Now calculate the variance of Pxpy (Px-y) */
     for (i = 0, sum = 0.0, sumSqr = 0.0; i < ng; ++i) {
         sum += pxpy[i];
-        sumSqr += pxpy[i] * pxpy[i];
+        sumSqr += SQR(pxpy[i]);
     }
     sqrNg = SQR(ng);
     var = (sqrNg * sumSqr - SQR(sum)) / SQR(sqrNg);
@@ -964,7 +964,7 @@ main (int argc, const char ** argv) {
 
     d = 1;
 
-    grays = pgm_readpgm (ifP, &cols, &rows, &maxval);
+    grays = pgm_readpgm(ifP, &cols, &rows, &maxval);
     pm_close (ifP);
 
     /* Determine the number of different gray scales (not maxval) */
@@ -979,7 +979,7 @@ main (int argc, const char ** argv) {
         if (tone[i] != -1)
             ++toneCt;
     }
-    pm_message("(Image has %u graylevels.)", toneCt);
+    pm_message("(Image has %u gray levels.)", toneCt);
 
     /* Collapse array, taking out all zero values */
     for (row = 0, itone = 0; row <= PGM_MAXMAXVAL; ++row)