Update of /cvsroot/pure-data/externals/postlude/flib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19714/src
Modified Files: cross~.c Log Message: Tidied.
Index: cross~.c =================================================================== RCS file: /cvsroot/pure-data/externals/postlude/flib/src/cross~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cross~.c 7 Apr 2006 10:30:43 -0000 1.1 --- cross~.c 7 Apr 2006 19:59:03 -0000 1.2 *************** *** 19,22 **** --- 19,24 ----
/*Calculate the (non optimized) cross correlation of two signal vectors*/ + /*Based on code by Phil Bourke */ +
#include "flib.h" *************** *** 77,96 **** sxy += (x[i] - mx) * (y[j] - my);
! ! /* ! if (j < 0 || j >= N) ! continue; ! else ! sxy += (x[i] - mx) * (y[j] - my); ! */ ! ! ! /* Or should it be (?) ! if (j < 0 || j >= n) ! sxy += (x[i] - mx) * (-my); ! else ! sxy += (x[i] - mx) * (y[j] - my); ! */ ! } r = sxy / denom; *out++ = r; --- 79,83 ---- sxy += (x[i] - mx) * (y[j] - my);
! } r = sxy / denom; *out++ = r;