41 EXPECTS_WITH_MESSAGE(x.shape()[0] == 3,
"nda::linalg::cross_product: Only defined for 3-dimensional vectors");
42 EXPECTS_WITH_MESSAGE(y.shape()[0] == 3,
"nda::linalg::cross_product: Only defined for 3-dimensional vectors");
44 r(0) = x(1) * y(2) - y(1) * x(2);
45 r(1) = -x(0) * y(2) + y(0) * x(2);
46 r(2) = x(0) * y(1) - y(0) * x(1);