コード例 #1
0
ファイル: LDMatrix44Test.cs プロジェクト: johndpope/math
        //------ EMatrix43.cpp ------
        public void identityTest()
        {
            LDMatrix44 actual   = new LDMatrix44();
            LDMatrix44 expected = new LDMatrix44();

            //ld_float delta = 0.00001f;

            // 単位行列に初期化できているかテスト
            expected.m11 = 1.0f;
            expected.m12 = 0.0f;
            expected.m13 = 0.0f;
            expected.m14 = 0.0f;
            expected.m21 = 0.0f;
            expected.m22 = 1.0f;
            expected.m23 = 0.0f;
            expected.m24 = 0.0f;
            expected.m31 = 0.0f;
            expected.m32 = 0.0f;
            expected.m33 = 1.0f;
            expected.m34 = 0.0f;
            expected.m41 = 0.0f;
            expected.m42 = 0.0f;
            expected.m43 = 0.0f;
            expected.m44 = 1.0f;
            actual.identity();
            TestUtil.COMPARE(expected.m11, actual.m11);
            TestUtil.COMPARE(expected.m12, actual.m12);
            TestUtil.COMPARE(expected.m13, actual.m13);
            TestUtil.COMPARE(expected.m14, actual.m14);
            TestUtil.COMPARE(expected.m21, actual.m21);
            TestUtil.COMPARE(expected.m22, actual.m22);
            TestUtil.COMPARE(expected.m23, actual.m23);
            TestUtil.COMPARE(expected.m24, actual.m24);
            TestUtil.COMPARE(expected.m31, actual.m31);
            TestUtil.COMPARE(expected.m32, actual.m32);
            TestUtil.COMPARE(expected.m33, actual.m33);
            TestUtil.COMPARE(expected.m34, actual.m34);
            TestUtil.COMPARE(expected.m41, actual.m41);
            TestUtil.COMPARE(expected.m42, actual.m42);
            TestUtil.COMPARE(expected.m43, actual.m43);
            TestUtil.COMPARE(expected.m44, actual.m44);
        }
コード例 #2
0
ファイル: LDMatrix44Test.cs プロジェクト: KajitaLD/math
        //------ EMatrix43.cpp ------
        public void identityTest()
        {
            LDMatrix44 actual=new LDMatrix44();
            LDMatrix44 expected = new LDMatrix44();
            //ld_float delta = 0.00001f;

            // 単位行列に初期化できているかテスト
            expected.m11 = 1.0f;
            expected.m12 = 0.0f;
            expected.m13 = 0.0f;
            expected.m14 = 0.0f;
            expected.m21 = 0.0f;
            expected.m22 = 1.0f;
            expected.m23 = 0.0f;
            expected.m24 = 0.0f;
            expected.m31 = 0.0f;
            expected.m32 = 0.0f;
            expected.m33 = 1.0f;
            expected.m34 = 0.0f;
            expected.m41 = 0.0f;
            expected.m42 = 0.0f;
            expected.m43 = 0.0f;
            expected.m44 = 1.0f;
            actual.identity();
            TestUtil.COMPARE(expected.m11, actual.m11);
            TestUtil.COMPARE(expected.m12, actual.m12);
            TestUtil.COMPARE(expected.m13, actual.m13);
            TestUtil.COMPARE(expected.m14, actual.m14);
            TestUtil.COMPARE(expected.m21, actual.m21);
            TestUtil.COMPARE(expected.m22, actual.m22);
            TestUtil.COMPARE(expected.m23, actual.m23);
            TestUtil.COMPARE(expected.m24, actual.m24);
            TestUtil.COMPARE(expected.m31, actual.m31);
            TestUtil.COMPARE(expected.m32, actual.m32);
            TestUtil.COMPARE(expected.m33, actual.m33);
            TestUtil.COMPARE(expected.m34, actual.m34);
            TestUtil.COMPARE(expected.m41, actual.m41);
            TestUtil.COMPARE(expected.m42, actual.m42);
            TestUtil.COMPARE(expected.m43, actual.m43);
            TestUtil.COMPARE(expected.m44, actual.m44);
        }
コード例 #3
0
ファイル: LDAffineTransform.cs プロジェクト: johndpope/math
 public LDAffineTransform()
 {
     m_matrix.identity();
 }