# Gimp.Vector2.prototype.cross_product

    function cross_product(vector2: Gimp.Vector2): Gimp.Vector2 {
        // Gjs wrapper for gimp_vector2_cross_product()
    }

Compute the cross product of two vectors. The result is a Gimp.Vector2 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.

vector2

  a pointer to the second Gimp.Vector2.

Returns

  The cross product.