csvorbis.CodeBook.dist C# (CSharp) Method

dist() static private method

static private dist ( int el, float rref, int index, float b, int step ) : float
el int
rref float
index int
b float
step int
return float
        internal static float dist(int el, float[] rref, int index, float[] b, int step)
        {
            float acc=(float)0.0;
            for(int i=0; i<el; i++)
            {
                float val=(rref[index+i]-b[i*step]);
                acc+=val*val;
            }
            return(acc);
        }