cross_product


Description:

public Vector2 cross_product (Vector2 vector2)

Compute the cross product of two vectors.

The result is a Vector2 which is orthogonal to both this and vector2. If this and vector2 are parallel, the result will be the nul vector.

Note that in 2D, this function is useful to test if two vectors are parallel or not, or to compute the area spawned by two vectors.

Parameters:

this

a pointer to the first Vector2.

vector2

a pointer to the second Vector2.

Returns:

The cross product.