本文整理匯總了C#中NGenerics.DataStructures.Mathematical.Vector3D.CrossProduct方法的典型用法代碼示例。如果您正苦於以下問題:C# Vector3D.CrossProduct方法的具體用法?C# Vector3D.CrossProduct怎麽用?C# Vector3D.CrossProduct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NGenerics.DataStructures.Mathematical.Vector3D
的用法示例。
在下文中一共展示了Vector3D.CrossProduct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Vector3D3x2
public void Vector3D3x2()
{
var vector3D = new Vector3D(1, 2, 3);
var vector2D = new Vector2D(4, 5);
var vector = vector3D.CrossProduct(vector2D);
Assert.AreEqual(-15, vector.X);
Assert.AreEqual(12, vector.Y);
Assert.AreEqual(-3, vector.Z);
}
示例2: IVector3x3
public void IVector3x3()
{
var vector3D = new Vector3D(1, 2, 3);
var vectorN = new VectorN(3);
vectorN.SetValues(4, 5, 6);
var vector = vector3D.CrossProduct(vectorN);
Assert.AreEqual(-3, vector[0]);
Assert.AreEqual(6, vector[1]);
Assert.AreEqual(-3, vector[2]);
}
示例3: CrossProduct3DExample
public void CrossProduct3DExample()
{
var vector1 = new Vector3D(1, 2, 3);
var vector2 = new Vector3D(4, 5, 6);
var vector = vector1.CrossProduct(vector2);
Assert.AreEqual(-3, vector.X);
Assert.AreEqual(6, vector.Y);
Assert.AreEqual(-3, vector.Z);
}
示例4: ExceptionNullVector3D
public void ExceptionNullVector3D()
{
var vector = new Vector3D();
vector.CrossProduct((Vector3D)null);
}