Accord.Tests.Math.Matrix3x3Test.CreateRotationXTest C# (CSharp) Method

CreateRotationXTest() private method

private CreateRotationXTest ( float angle ) : void
angle float
return void
        public void CreateRotationXTest(float angle)
        {
            float radians = (float)(angle * System.Math.PI / 180);
            Matrix3x3 matrix = Matrix3x3.CreateRotationX(radians);

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

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

            CompareMatrixWithArray(matrix, expectedArray);
        }