public Vector SubtractVector(Vector vector) { return new Vector { X = X - vector.X, Y = Y - vector.Y, Z = Z - vector.Z }; }
public Vector AddVector(Vector vector) { return new Vector { X = X + vector.X, Y = Y + vector.Y, Z = Z + vector.Z }; }
public Vector FindCrossProduct(Vector bVector) { return new Vector { X = (Y*bVector.Z) - (Z*bVector.Y), Y = (Z*bVector.X) - (X*bVector.Z), Z = (X*bVector.Y) - (Y*bVector.X) }; }
public Point SubtractVector(Vector vector) { return new Point { X = X - vector.X, Y = Y - vector.Y, Z = Z - vector.Z }; }
public Point AddVector(Vector vector) { return new Point { X = X + vector.X, Y = Y + vector.Y, Z = Z + vector.Z }; }
public void FindCrossProduct() { Console.WriteLine("Finding Cross Product of two Vectors:"); var aVector = new Vector() { X = 5, Y = 1, Z = 4 }; aVector.PrintVectorToScreen(); var bVector = new Vector() { X = -1, Y = 0, Z = 2 }; bVector.PrintVectorToScreen(); var cVector = aVector.FindCrossProduct(bVector); cVector.PrintVectorToScreen(); }