Method

GimpVector2cross_product

Declaration [src]

GimpVector2
gimp_vector2_cross_product (
  const GimpVector2* vector1,
  const GimpVector2* vector2
)

Description [src]

Compute the cross product of two vectors. The result is a GimpVector2 which is orthogonal to both vector1 and vector2. If vector1 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

vector2

Type: GimpVector2

A pointer to the second GimpVector2.

The data is owned by the caller of the function.

Return value

Type: GimpVector2

The cross product.