extprod3d: Compute external- or 'cross'- product of 3D vectors.

extprod3dR Documentation

Compute external- or ‘cross’- product of 3D vectors.

Description

Computes the external product

\left(x_2 y_3 - x_3 y_2,\; x_3 y_1 - x_1 y_3,\; x_1 y_2 - x_2 y_1 \right)

of the 3D vectors in x and y.

Usage

extprod3d(x, y, drop = TRUE)

Arguments

x

n-by-3 matrix. Each row is one x-vector

y

n-by-3 matrix. Each row is one y-vector

drop

logical. If TRUE and if the inputs are one row matrices or vectors, then delete the dimensions of the array returned.

Value

If n is greater than 1 or drop is FALSE, n-by-3 matrix; if n is 1 and drop is TRUE, a vector of length 3.

Author(s)

Raoul Grasman

See Also

drop


geometry documentation built on Sept. 11, 2024, 9 p.m.