CrossProduct3D: CrossProduct3D(a,b,i)

Description Usage Arguments Value Author(s) Examples

View source: R/CrossProduct3D.R

Description

This function calculates the cross product of two vectors, each of length 3. Specifying i = 1, 2 or 3 returns a single element of the cross-product vector, based on the i index. Leaving i blank returns the entire cross-product vector.

Usage

1
CrossProduct3D(x, y, i = 1:3)

Arguments

i

An index value of 1, 2, or 3.

a

A vector of length 3.

b

A vector of length 3.

Value

A vector (length 3) containing the cross-product of the two input vectors.

Author(s)

Jennifer Starling

Examples

1
2
3
a <- c(2,3,4)
b <- c(5,6,7)
x <- CrossProduct3D(a,b)

jstarling1/starlib documentation built on May 20, 2019, 2:12 a.m.