MTExample5_5.Matrix3.Rotate3Y C# (CSharp) Method

Rotate3Y() public static method

public static Rotate3Y ( float theta ) : Matrix3
theta float
return Matrix3
        public static Matrix3 Rotate3Y(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, 2] = sn;
            result.M[2, 0] = -sn;
            result.M[2, 2] = cn;
            return result;
        }