diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2007-09-04 19:07:55 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2007-09-04 19:07:55 +0000 |
commit | 280bf6f6ba2c6ad6d4f470573ca23d72541813c1 (patch) | |
tree | 7c969fa59f5cee115b7a405ad45221d52f9ed1b2 /src | |
parent | e80ffb5d91cd3e017b5549e912a4e93f7bf03572 (diff) | |
download | LibXtract-280bf6f6ba2c6ad6d4f470573ca23d72541813c1.tar.gz LibXtract-280bf6f6ba2c6ad6d4f470573ca23d72541813c1.tar.bz2 LibXtract-280bf6f6ba2c6ad6d4f470573ca23d72541813c1.zip |
Added basic SWIG wrapper generator (use ./configure --enable-swig etc)
Diffstat (limited to 'src')
-rw-r--r-- | src/scalar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scalar.c b/src/scalar.c index 6270869..fef1e6e 100644 --- a/src/scalar.c +++ b/src/scalar.c @@ -39,10 +39,12 @@ int xtract_mean(const float *data, const int N, const void *argv, float *result){ int n = N; + + *result = 0.f; while(n--) *result += data[n]; - + *result /= N; return XTRACT_SUCCESS; |