10 #include <gtest/gtest.h> 18 const double test_values[][2] = {{0.0, .0},
19 {0.79788456080286541, 0.721705924292605},
20 {1.0, 0.779893400376823},
21 {0.4, 0.397480759172359},
22 {1.5, 0.445261176039822},
23 {2.0, 0.488253406075341},
24 {2.4, 0.554961405856428},
25 {3.34, 0.407099627096608},
26 {50.0, 0.499999189430728},
27 {-0.4, -0.397480759172359},
28 {-1.5, -0.445261176039822},
29 {-2.0, -0.488253406075341},
30 {-2.4, -0.554961405856428},
31 {-3.34, -0.407099627096608},
32 {-50.0, -0.499999189430728}};
34 for (
auto test_value : test_values)
36 const double x = test_value[0], val_good = test_value[1];
39 <<
" x: " << x <<
"\n val_good: " << val_good <<
"\n val: " <<
val 47 const double test_values[][2] = {{0.0, .0},
48 {1.0, 0.438259147390355},
49 {1.5, 0.697504960082093},
50 {2.4, 0.619689964945684},
51 {50.0, 0.493633802585939},
52 {-2.0, -0.343415678363698},
53 {-2.4, -0.619689964945684},
54 {-3.34, -0.479600423968308},
55 {-50.0, -0.493633802585939}};
57 for (
auto test_value : test_values)
59 const double x = test_value[0], val_good = test_value[1];
62 <<
" x: " << x <<
"\n val_good: " << val_good <<
"\n val: " <<
val double fresnel_cos_integral(double x) noexcept
Evaluates the integral from 0 to x of sqrt(2/pi) cos(t^2) dt.
double fresnel_sin_integral(double x) noexcept
Evaluates the integral from 0 to x of sqrt(2/pi) sin(t^2) dt.
EXPECT_NEAR(out.cam_params.rightCameraPose.x, 0.1194, 0.005)