Mercurial > hg > qm-dsp
diff maths/Correlation.cpp @ 477:fa407c1d9923
Untabify + indent
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 30 May 2019 18:36:48 +0100 |
parents | d5014ab8b0e5 |
children | 701233f8ed41 |
line wrap: on
line diff
--- a/maths/Correlation.cpp Thu May 30 18:30:58 2019 +0100 +++ b/maths/Correlation.cpp Thu May 30 18:36:48 2019 +0100 @@ -36,21 +36,19 @@ unsigned int i,j; - for( i = 0; i < length; i++) - { - for( j = i; j < length; j++) - { - tmp += src[ j-i ] * src[ j ]; - } + for( i = 0; i < length; i++) { + for( j = i; j < length; j++) { + tmp += src[ j-i ] * src[ j ]; + } + outVal = tmp / ( length - i ); - outVal = tmp / ( length - i ); - - if( outVal <= 0 ) - dst[ i ] = EPS; - else - dst[ i ] = outVal; - - tmp = 0.0; + if( outVal <= 0 ) { + dst[ i ] = EPS; + } else { + dst[ i ] = outVal; + } + + tmp = 0.0; } }