hsignal 0.1.3.3 → 0.1.3.4
raw patch · 3 files changed
+27/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES +4/−0
- hsignal.cabal +1/−1
- lib/Numeric/Signal/signal-aux.c +22/−1
CHANGES view
@@ -60,3 +60,7 @@ 0.1.3.3: updated to reflect change in mtl > 2++0.1.3.4:+ renamed unwrap to unwrap_double+ added unwrap_float
hsignal.cabal view
@@ -1,5 +1,5 @@ Name: hsignal-Version: 0.1.3.3+Version: 0.1.3.4 License: BSD3 License-file: LICENSE Copyright: (c) A.V.H. McPhail 2010, 2011
lib/Numeric/Signal/signal-aux.c view
@@ -277,7 +277,7 @@ return 0; } -int unwrap(int xs, const double* x, int rs, double* r)+int unwrap_double(int xs, const double* x, int rs, double* r) { if (rs != xs) return 2000; // BAD_SIZE @@ -296,3 +296,24 @@ return 0; }++int unwrap_float(int xs, const float* x, int rs, float* r)+{+ if (rs != xs) return 2000; // BAD_SIZE++ int i;++ r[0] = x[0];++ int j = 0;++ for (i = 1; i < rs; i++) {+ if (x[i] < x[i-1]) {+ j += 1;+ }+ r[i] = x[i] + j*2*M_PI;+ }++ return 0;+}+