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

CreateRotationYTest() private method

private CreateRotationYTest ( float angle ) : void
angle float
return void
        public void CreateRotationYTest(float angle)
        {
            float radians = (float)(angle * System.Math.PI / 180);
            Matrix4x4 matrix = Matrix4x4.CreateRotationY(radians);

            float sin = (float)System.Math.Sin(radians);
            float cos = (float)System.Math.Cos(radians);

            float[] expectedArray = new float[16]
            {
                cos, 0, sin, 0,
                0, 1, 0, 0,
                -sin, 0, cos, 0,
                0, 0, 0, 1
            };

            CompareMatrixWithArray(matrix, expectedArray);
        }