Vector3DCrossProduct Method
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Calculates the cross product of two Vector3D structures.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static Vector3D CrossProduct(
	Vector3D vector1,
	Vector3D vector2
)
public:
static Vector3D CrossProduct(
	Vector3D vector1,
	Vector3D vector2
)
static member CrossProduct : 
        vector1:Vector3D *
        vector2:Vector3D -> Vector3D
Public Shared Function CrossProduct (
	vector1 As Vector3D,
	vector2 As Vector3D
) As Vector3D

Parameters

vector1
Type:

The first Vector3D structure to evaluate.

vector2
Type:

The second Vector3D structure to evaluate.

Return Value

Type:

The cross product of vector1 and vector2.

// Calculates the cross product of two Vector3D structures 
                  // using the static CrossProduct method.  
// Returns a Double.	

Vector3D vector1 = new Vector3D(20, 30, 40);
Vector3D vector2 = new Vector3D(45, 70, 80);
                  Vector3D crossProduct = new Vector3D();

                  crossProduct = Vector3D.CrossProduct(vector1,vector2);
                  // crossProduct is equal to (-400, 200, 50)
' Calculates the cross product of two Vector3D structures 
' using the static CrossProduct method.  
' Returns a Double.	

Dim vector1 As New Vector3D(20, 30, 40)
Dim vector2 As New Vector3D(45, 70, 80)
Dim crossProduct As New Vector3D()

crossProduct = Vector3D.CrossProduct(vector1,vector2)
' crossProduct is equal to (-400, 200, 50)
.NET Framework
Available since 3.0
Return to top