R/cross.R

Defines functions cross

cross = function(a, b) {
  # Returns the cross product of the two 3d vectors a and b
  i = c(2,3,1)
  j = c(3,1,2)
  return (a[i]*b[j] - a[j]*b[i])
}

Try the egg package in your browser

Any scripts or data that you put into this service are public.

egg documentation built on May 2, 2019, 5:55 p.m.