MTExample5_5.Matrix3.Rotate3Z C# (CSharp) Method

Rotate3Z() public static method

public static Rotate3Z ( float theta ) : Matrix3
theta float
return Matrix3
        public static Matrix3 Rotate3Z(float theta)
        {
            theta = theta * (float)Math.PI / 180.0f;
            var sn = (float)Math.Sin(theta);
            var cn = (float)Math.Cos(theta);
            var result = new Matrix3();
            result.M[0, 0] = cn;
            result.M[0, 1] = -sn;
            result.M[1, 0] = sn;
            result.M[1, 1] = cn;
            return result;
        }