Revision a7001ff1805634d18a10fa371b38dbe3e48f8c9e authored by HwB on 30 October 2011, 00:00:00 UTC, committed by Gabor Csardi on 30 October 2011, 00:00:00 UTC
1 parent 6b51622
cross.Rd
\name{cross}
\alias{cross}
\title{Vector Cross Product}
\description{
Vector or cross product
}
\usage{
cross(x, y)
}
\arguments{
\item{x}{numeric vector or matrix}
\item{y}{numeric vector or matrix}
}
\details{
Computes the cross (or: vector) product of vectors in 3 dimensions.
In case of matrices it takes the first dimension of length 3 and
computes the cross product between corresponding columns or rows.
The more general cross product of \code{n-1} vectors in n-dimensional
space is realized as \code{crossn}.
}
\value{
3-dim. vector if \code{x} and \code{<} are vectors, a matrix of
3-dim. vectors if \code{x} and \code{y} are matrices themselves.
}
\author{
hwb \email{hwborchers@googlemail.com}
}
\seealso{
\code{\link{dot}}, \code{\link{crossn}}
}
\examples{
cross(c(1, 2, 3), c(4, 5, 6)) # -3 6 -3
}
\keyword{ array }
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...