cross {globe}R Documentation

Cross Product

Description

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

Usage

  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

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

[Package globe version 1.2-0 Index]