cross: Cross Product

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ajbplot.R

Description

Computes the cross-product of two vectors in 3D.

Usage

1
  cross(a, b)

Arguments

a,b

Numeric vectors of length 3.

Details

Computes the cross product of the two vectors.

Value

A vector of length 3 representing the cross product. If the input vectors have length greater than 3, only the first 3 elements will be used in this calculation.

Author(s)

Adrian Baddeley and Tom Lawrence

See Also

dot

Examples

1
2
3
   a <- c(1,0,0)
   b <- c(0,1,0)
   cross(a, b)

baddstats/globe documentation built on June 4, 2017, 12:12 a.m.