/// <summary> /// Crosses the product. /// </summary> /// <param name="point">The point.</param> /// <returns>Vector3D.</returns> public Vector3D CrossProduct(Vector3D point) { double[] matrix = VectorLibrary.CrossProduct( Xcomponent, Ycomponent, Zcomponent, point.Xcomponent, point.Ycomponent, point.Zcomponent); return(new Vector3D(matrix[0], matrix[1], matrix[2])); }
/// <summary> /// Crosses the product. /// </summary> /// <param name="point">The point.</param> /// <returns>Point3D.</returns> public CartesianCoordinate3D CrossProduct(CartesianCoordinate3D point) { double[] matrix = VectorLibrary.CrossProduct(X, Y, Z, point.X, point.Y, point.Z); return(new CartesianCoordinate3D(matrix[0], matrix[1], matrix[2], Tolerance)); }
/// <summary> /// Returns the cross product/determinant of the coordinates. /// x1*y2 - x2*y1 /// </summary> /// <param name="coordinate">The coordinate.</param> /// <returns>System.Double.</returns> public double CrossProduct(CartesianCoordinate coordinate) { return(VectorLibrary.CrossProduct(X, Y, coordinate.X, coordinate.Y)); }
public static void CrossProduct(double x1, double y1, double x2, double y2, double expectedResult) { Assert.AreEqual(expectedResult, VectorLibrary.CrossProduct(x1, y1, x2, y2), Tolerance); }