diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-07-12 20:16:52 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-07-12 20:16:52 +0000 |
commit | 55fb732d03358caa22b72d83d2e406f2e33bb61a (patch) | |
tree | 3fb13c9ad697b211b2f38134d32523305f8b723a /other/pamarith.c | |
parent | 782a4aef6be298d544c506433375cd2db99d4d6d (diff) | |
download | netpbm-mirror-55fb732d03358caa22b72d83d2e406f2e33bb61a.tar.gz netpbm-mirror-55fb732d03358caa22b72d83d2e406f2e33bb61a.tar.xz netpbm-mirror-55fb732d03358caa22b72d83d2e406f2e33bb61a.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@670 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other/pamarith.c')
-rw-r--r-- | other/pamarith.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/other/pamarith.c b/other/pamarith.c index d79f1e60..7d973222 100644 --- a/other/pamarith.c +++ b/other/pamarith.c @@ -508,7 +508,7 @@ sampleMean(sample const operands[], if (UINT_MAX - operands[i] < sum) pm_error("Arithmetic overflow adding samples for mean"); } - return (sum + operandCt/2) / operandCt; + return ROUNDDIV(sum, operandCt); } @@ -656,7 +656,7 @@ applyUnNormalizedFunction(enum function const function, break; case FN_DIVIDE: result = (operands[1] > operands[0]) ? - (operands[0] * maxval + operands[1]/2) / operands[1] : maxval; + ROUNDDIV(operands[0] * maxval, operands[1]) : maxval; break; case FN_AND: |