Vector3D.CrossProduct(Vector3D, Vector3D) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
計算兩個 Vector3D 結構的叉積。
public:
static System::Windows::Media::Media3D::Vector3D CrossProduct(System::Windows::Media::Media3D::Vector3D vector1, System::Windows::Media::Media3D::Vector3D vector2);
public static System.Windows.Media.Media3D.Vector3D CrossProduct (System.Windows.Media.Media3D.Vector3D vector1, System.Windows.Media.Media3D.Vector3D vector2);
static member CrossProduct : System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.Vector3D
Public Shared Function CrossProduct (vector1 As Vector3D, vector2 As Vector3D) As Vector3D
參數
傳回
vector1
與 vector2
的叉積 (Cross Product)。
範例
// 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)