Ejemplo n.º 1
0
        public void Vector2D2x2()
        {
            var vector1 = new Vector2D(2, 3);

            var vector2 = new Vector2D(4, 5);

            IVector<double> vector = vector1.CrossProduct(vector2);

            Assert.AreEqual(0, vector[0]);
            Assert.AreEqual(0, vector[1]);
            Assert.AreEqual(-5, vector[2]);
        }
Ejemplo n.º 2
0
        public void IVector2x2()
        {
            var vector2D = new Vector2D(2, 3);

            var vectorN = new VectorN(2);
            vectorN.SetValues(4, 5);

            var vector = vector2D.CrossProduct(vectorN);

            Assert.AreEqual(0, vector[0]);
            Assert.AreEqual(0, vector[1]);
            Assert.AreEqual(-5, vector[2]);
        }
Ejemplo n.º 3
0
        public void IVector2x3()
        {
            var vector2D = new Vector2D(4, 5);

            var vectorN = new VectorN(3);
            vectorN.SetValues(1, 2, 3);

            var vector = vector2D.CrossProduct(vectorN);

            Assert.AreEqual(15, vector[0]);
            Assert.AreEqual(-12, vector[1]);
            Assert.AreEqual(3, vector[2]);
        }
Ejemplo n.º 4
0
        public void CrossProduct3DExample()
        {
            var vector2D = new Vector2D(4, 5);

            var vector3D = new Vector3D(1, 2, 3);

            IVector<double> vector = vector2D.CrossProduct(vector3D);

            Assert.AreEqual(15, vector[0]);
            Assert.AreEqual(-12, vector[1]);
            Assert.AreEqual(3, vector[2]);
        }
Ejemplo n.º 5
0
 public void ExcetionNullVector3D()
 {
     var vector = new Vector2D();
     vector.CrossProduct((Vector3D)null);
 }