View source: R/vectorproduct.R
| vectorproduct | R Documentation |
Computes the vector (cross) product of two three-dimensional vectors. The inputs may be individual vectors or matrices whose rows represent vectors.
vectorproduct(x, y, normalize = FALSE)
x, y |
Numeric vectors of length three or matrices with three columns. If a matrix is supplied, each row is interpreted as a vector. |
normalize |
Logical flag indicating whether the resulting vector(s) should be normalized to unit length. |
Returns either a 3-element vector or an n\times3 matrix containing
the row-wise vector products.
scalarproduct, vectornorm,
unitvector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.