Changes in src/mathutils.c [33d0242:b799241]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
r33d0242 rb799241 290 290 } 291 291 292 void fvec_push(fvec_t *in, smpl_t new_elem) { 293 uint_t i; 294 for (i = 0; i < in->length - 1; i++) { 295 in->data[i] = in->data[i + 1]; 296 } 297 in->data[in->length - 1] = new_elem; 298 } 299 300 void fvec_clamp(fvec_t *in, smpl_t absmax) { 301 uint_t i; 302 for (i = 0; i < in->length; i++) { 303 if (in->data[i] > 0 && in->data[i] > ABS(absmax)) { 304 in->data[i] = absmax; 305 } else if (in->data[i] < 0 && in->data[i] < -ABS(absmax)) { 306 in->data[i] = -absmax; 307 } 308 } 309 } 310 292 311 smpl_t 293 312 aubio_level_lin (const fvec_t * f)
Note: See TracChangeset
for help on using the changeset viewer.