diff WindowFunction.cpp @ 13:7680cc4c0073

* Tidying - made length of array variables type size_t and for loops unsigned int, where index > 0. * Window length parameter is now a dropdown box.
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Wed, 13 Aug 2014 14:18:00 +0100
parents 09fb76606b2b
children de7213b35755
line wrap: on
line diff
--- a/WindowFunction.cpp	Wed Aug 13 10:47:39 2014 +0100
+++ b/WindowFunction.cpp	Wed Aug 13 14:18:00 2014 +0100
@@ -11,10 +11,10 @@
 
 //static function
 void
-WindowFunction::hanning(float *window, const unsigned int N, const bool normalise){
+WindowFunction::hanning(float * window, const unsigned int &N, const bool &normalise){
     
     float sum = 0;
-    for(int i = 0; i < N; i++){
+    for(unsigned int i = 0; i < N; i++){
         window[i] = 0.5*(1-cos((float)2*M_PI*i/N));
         sum += window[i];
     }