コード例 #1
0
ファイル: Mat2.cs プロジェクト: ioly54/TheRayTracerChallenge
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            Mat2 other = obj as Mat2;

            if (Utility.FE(this.mat[0, 0], other.mat[0, 0]) &&
                Utility.FE(this.mat[0, 1], other.mat[0, 1]) &&
                Utility.FE(this.mat[1, 0], other.mat[1, 0]) &&
                Utility.FE(this.mat[1, 1], other.mat[1, 1]))
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
ファイル: Mat3.cs プロジェクト: ioly54/TheRayTracerChallenge
        public double Minor(int r, int c)
        {
            Mat2 sub = this.Sub(r, c);

            return(sub.Det());
        }