Skip to contents

Compute the cross product of two 3D vectors

Usage

get_3d_cross_prod(v1, v2)

Arguments

v1

First vector, as c(x,y,z)

v2

Second vector, as c(x,y,z)

Value

A vector of length 3 that describes the cross-product

Author

Vikram B. Baliga

Examples

v1 <- c(1, 1, 3)
v2 <- c(3, 1, 3)
get_3d_cross_prod(v1, v2)
#> [1]  0  6 -2