Beispiel #1
0
        public void ScalarDivision()
        {
            IVector <DoubleComponent> ScalarMultiplicationArgument = MatrixFactory <DoubleComponent> .CreateVector3D(5.0f, 4.0f, 3.0f);

            Assert.IsTrue(ScalarMultiplicationArgument.Divide(2).Equals(MatrixFactory <DoubleComponent> .CreateVector3D(2.5f, 2.0f, 1.5f)));
            Assert.IsTrue(ScalarMultiplicationArgument.Multiply(.5).Equals(MatrixFactory <DoubleComponent> .CreateVector3D(2.5f, 2.0f, 1.5f)));

            IVector <DoubleComponent> Point3 = MatrixFactory <DoubleComponent> .CreateVector3D(12, 18, 24);

            Point3.DivideEquals(6);
            Assert.IsTrue(IComparable <IVector <DoubleComponent> > .Equals(Point3, MatrixFactory <DoubleComponent> .CreateVector3D(2, 3, 4)));
        }