41 #include <visp3/core/vpConfig.h>
43 #ifdef VISP_HAVE_CATCH2
45 #include <visp3/core/vpThetaUVector.h>
46 #include <visp3/core/vpUniRand.h>
48 #define CATCH_CONFIG_RUNNER
63 const double ctheta = std::cos(angle);
64 const double stheta = std::sin(angle);
65 const double ax = rng.
uniform(-1.0, 1.0);
66 const double ay = rng.
uniform(-1.0, 1.0);
67 const double az = rng.
uniform(-1.0, 1.0);
72 TEST_CASE(
"Theta u multiplication",
"[theta.u]")
74 const int nTrials = 100;
75 const uint64_t seed = 0x123456789;
77 for (
int iter = 0; iter < nTrials; iter++) {
89 const double tolerance = 1e-9;
90 for (
unsigned int i = 0; i < 3; i++) {
91 for (
unsigned int j = 0; j < 3; j++) {
92 CHECK(c1Rc3_ref[i][j] == Approx(c1Rc3[i][j]).epsilon(0).margin(tolerance));
98 TEST_CASE(
"Quaternion multiplication",
"[quaternion]")
100 const int nTrials = 100;
101 const uint64_t seed = 0x123456789;
103 for (
int iter = 0; iter < nTrials; iter++) {
116 const double tolerance = 1e-9;
117 for (
unsigned int i = 0; i < 3; i++) {
118 for (
unsigned int j = 0; j < 3; j++) {
119 CHECK(c1Rc3_ref[i][j] == Approx(c1Rc3[i][j]).epsilon(0).margin(tolerance));
125 int main(
int argc,
char *argv[])
127 Catch::Session session;
130 session.applyCommandLine(argc, argv);
132 int numFailed = session.run();
142 int main() {
return EXIT_SUCCESS; }
Implementation of column vector and the associated operations.
static double rad(double deg)
Implementation of a rotation vector as quaternion angle minimal representation.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as axis-angle minimal representation.
Class for generating random numbers with uniform probability density.
int uniform(int a, int b)