ARCed.Core.QColorMatrix.RotateColor C# (CSharp) Method

RotateColor() private method

X and Y are the indices of the value to receive the sin(phi) value
private RotateColor ( float phi, int x, int y, MatrixOrder order ) : void
phi float phi is in degrees
x int x value
y int y value
order MatrixOrder Matrix order
return void
        private void RotateColor(float phi, int x, int y, MatrixOrder order)
        {
            phi *= RAD;
            var qm = new QColorMatrix();
            qm._matrix[x, x] = qm._matrix[y, y] = (float)Math.Cos(phi);
            var s = (float)Math.Sin(phi);
            qm._matrix[y, x] = s;
            qm._matrix[x, y] = -s;
            this.Multiply(qm, order);
        }