Vector2.Cross(Vector2, Vector2) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the z-value of the cross product of two vectors.
Since the Vector2 is in the x-y plane, a 3D cross product only produces the z-value.
public:
static float Cross(System::Numerics::Vector2 value1, System::Numerics::Vector2 value2);
public static float Cross(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2);
static member Cross : System.Numerics.Vector2 * System.Numerics.Vector2 -> single
Public Shared Function Cross (value1 As Vector2, value2 As Vector2) As Single
Parameters
- value1
- Vector2
The first vector.
- value2
- Vector2
The second vector.
Returns
The value of the z-coordinate from the cross product.
Remarks
Return z-value = value1.X * value2.Y - value1.Y * value2.X Cross(Vector2, Vector2) is the same as taking the Dot(Vector2, Vector2) with the second vector that has been rotated 90-degrees.