Accord.Tests.Math.Matrix4x4Test.CreateRotationYTest C# (CSharp) 메소드

CreateRotationYTest() 개인적인 메소드

private CreateRotationYTest ( float angle ) : void
angle float
리턴 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);
        }