comparison maths/MathUtilities.cpp @ 58:d72fcd34d9a7

* Fixes to problems shown up by vamp-plugin-tester. Still not all plugins pass all tests, though
author cannam
date Mon, 23 Mar 2009 16:28:53 +0000
parents 7fe29d8a7eaf
children 054c384d860d
comparison
equal deleted inserted replaced
57:d241e7701c0c 58:d72fcd34d9a7
161 void MathUtilities::getFrameMinMax(const double *data, unsigned int len, double *min, double *max) 161 void MathUtilities::getFrameMinMax(const double *data, unsigned int len, double *min, double *max)
162 { 162 {
163 unsigned int i; 163 unsigned int i;
164 double temp = 0.0; 164 double temp = 0.0;
165 double a=0.0; 165 double a=0.0;
166
167 if (len == 0) {
168 *min = *max = 0;
169 return;
170 }
166 171
167 *min = data[0]; 172 *min = data[0];
168 *max = data[0]; 173 *max = data[0];
169 174
170 for( i = 0; i < len; i++) 175 for( i = 0; i < len; i++)