MTExample5_5.Matrix3.Oblique C# (CSharp) Method

Oblique() public static method

public static Oblique ( float alpha, float theta ) : Matrix3
alpha float
theta float
return Matrix3
        public static Matrix3 Oblique(float alpha, float theta)
        {
            var result = new Matrix3 ();
            var ta = (float)Math.Tan(alpha * Math.PI / 180);
            var snt = (float)Math.Sin(theta * Math.PI / 180);
            var cnt = (float)Math.Cos(theta * Math.PI / 180);
            result.M[0, 2] = -cnt / ta;
            result.M[1, 2] = -snt / ta;
            result.M[2, 2] = 0;
            return result;
        }