def Cross(a,b):
  """Cross returns the cross product of 2 vectors of length 3, or a zero vector if the vectors are not both length 3."""
  assert len(a) == len(b) == 3, "Cross was given a vector whose length is not 3. a: %s b: %s" % (a, b)
  c = [a[1]*b[2] - a[2]*b[1], a[2]*b[0] - a[0]*b[2], a[0]*b[1] - a[1]*b[0]]
  return c