Accord.Tests.Math.Matrix4x4Test.ToArrayTest C# (CSharp) Method

ToArrayTest() private method

private ToArrayTest ( ) : void
return void
        public void ToArrayTest()
        {
            Matrix4x4 matrix = new Matrix4x4();

            matrix.V00 = 1;
            matrix.V01 = 2;
            matrix.V02 = 3;
            matrix.V03 = 4;

            matrix.V10 = 5;
            matrix.V11 = 6;
            matrix.V12 = 7;
            matrix.V13 = 8;

            matrix.V20 = 9;
            matrix.V21 = 10;
            matrix.V22 = 11;
            matrix.V23 = 12;

            matrix.V30 = 13;
            matrix.V31 = 14;
            matrix.V32 = 15;
            matrix.V33 = 16;

            float[] array = matrix.ToArray();

            for (int i = 0; i < 16; i++)
            {
                Assert.AreEqual(array[i], (float)(i + 1));
            }
        }