SparrowSharp.Filters.ColorMatrix.ConcatMatrix C# (CSharp) Method

ConcatMatrix() private method

private ConcatMatrix ( ColorMatrix target, float source ) : void
target ColorMatrix
source float
return void
        private void ConcatMatrix(ColorMatrix target, float[] source)
        {
            int i = 0;
            float[] temp = new float[20];
            for (int y = 0; y < 4; ++y)
            {
                for (int x = 0; x < 5; ++x)
                {
                    temp[i + x] = source[i] * target._m[x] +
                    source[i + 1] * target._m[x + 5] +
                    source[i + 2] * target._m[x + 10] +
                    source[i + 3] * target._m[x + 15] + (x == 4 ? source[i + 4] : 0);
                }
                i += 5;
            }
            target._m = temp;
        }
    }