Lines Matching full:cross
31 // cross product
32 VERIFY_IS_MUCH_SMALLER_THAN(v1.cross(v2).dot(v1), Scalar(1));
33 VERIFY_IS_MUCH_SMALLER_THAN(v1.dot(v1.cross(v2)), Scalar(1));
34 VERIFY_IS_MUCH_SMALLER_THAN(v1.cross(v2).dot(v2), Scalar(1));
35 VERIFY_IS_MUCH_SMALLER_THAN(v2.dot(v1.cross(v2)), Scalar(1));
36 VERIFY_IS_MUCH_SMALLER_THAN(v1.cross(Vector3::Random()).dot(v1), Scalar(1));
39 (v0.cross(v1)).normalized(),
40 (v0.cross(v1).cross(v0)).normalized();
44 VERIFY_IS_APPROX(v0.cross(mat3*v1), -(mat3*v1).cross(v0));
45 VERIFY_IS_APPROX(v0.cross(mat3.lazyProduct(v1)), -(mat3.lazyProduct(v1)).cross(v0));
47 // colwise/rowwise cross product
52 mcross = mat3.colwise().cross(vec3);
53 VERIFY_IS_APPROX(mcross.col(i), mat3.col(i).cross(vec3));
55 VERIFY_IS_MUCH_SMALLER_THAN((mat3.adjoint() * mat3.colwise().cross(vec3)).diagonal().cwiseAbs().sum(), Scalar(1));
56 VERIFY_IS_MUCH_SMALLER_THAN((mat3.adjoint() * mat3.colwise().cross(Vector3::Random())).diagonal().cwiseAbs().sum(), Scalar(1));
58 VERIFY_IS_MUCH_SMALLER_THAN((vec3.adjoint() * mat3.colwise().cross(vec3)).cwiseAbs().sum(), Scalar(1));
59 VERIFY_IS_MUCH_SMALLER_THAN((vec3.adjoint() * Matrix3::Random().colwise().cross(vec3)).cwiseAbs().sum(), Scalar(1));
61 mcross = mat3.rowwise().cross(vec3);
62 VERIFY_IS_APPROX(mcross.row(i), mat3.row(i).cross(vec3));
69 v42.template head<3>() = v40.template head<3>().cross(v41.template head<3>());
76 VERIFY_IS_APPROX(v1.cross(rv1.template cast<Scalar>()), v1.cross(rv1));
77 VERIFY_IS_APPROX(rv1.template cast<Scalar>().cross(v1), rv1.cross(v1));
103 // colwise/rowwise cross product
109 mcross3N = mat3N.colwise().cross(vec3);
110 VERIFY_IS_APPROX(mcross3N.col(i), mat3N.col(i).cross(vec3));
114 mcrossN3 = matN3.rowwise().cross(vec3);
115 VERIFY_IS_APPROX(mcrossN3.row(i), matN3.row(i).cross(vec3));