AcoustID.Util.Helper.PrepareHammingWindow C# (CSharp) Method

PrepareHammingWindow() public static method

public static PrepareHammingWindow ( double &vector, int first, int last ) : void
vector double
first int
last int
return void
        public static void PrepareHammingWindow(ref double[] vector, int first, int last)
        {
            int i = 0, max_i = last - first - 1;
            double scale = 2.0 * Math.PI / max_i;
            while (first != last)
            {
                vector[first] = 0.54 - 0.46 * Math.Cos(scale * i++);
                first++;
            }
        }