コード例 #1
0
        public void TestTranslateAlongYAxisNoTranslation()
        {
            Vector3D expected = new Vector3D(5, 5, 5);
            Vector3D actual   = VectorManipulation.TranslateAlongYAxis(new Vector3D(5, 5, 5), 0);

            VectorAssert.AreEqual(expected, actual, 0.0001);
        }
コード例 #2
0
        public void RotateNormalizedUnitVectorByZeroDegrees()
        {
            Vector3D expected = new Vector3D(5, 5, 5);
            Vector3D actual   = VectorManipulation.RotateAboutZAxis(new Vector3D(5, 5, 5), 0);

            VectorAssert.AreEqual(expected, actual, 0.0001);
        }
コード例 #3
0
        public void RotateVectorWithNonZeroXYZComponents()
        {
            Vector3D expected = new Vector3D(-15.980762, 32.320508, 45);
            Vector3D actual   = VectorManipulation.RotateAboutZAxis(new Vector3D(20, 30, 45), 60);

            VectorAssert.AreEqual(expected, actual, 0.0001);
        }
コード例 #4
0
        public void RotateNormalizedUnitVectorByALargeAngle()
        {
            Vector3D expected = new Vector3D(-6.830127, 1.830127, 5);
            Vector3D actual   = VectorManipulation.RotateAboutZAxis(new Vector3D(5, 5, 5), 1200);

            VectorAssert.AreEqual(expected, actual, 0.0001);
        }
コード例 #5
0
        public void RotateNormalizedUnitVector()
        {
            Vector3D expected = new Vector3D(0.707107, 0.707107, 0);
            Vector3D actual   = VectorManipulation.RotateAboutZAxis(new Vector3D(1, 0, 0), 45);

            VectorAssert.AreEqual(expected, actual, 0.0001);
        }