25 double nb_of_sample = 100;
26 double epsilon_rad = 1.0E-5F;
27 double max_error_expected = 0.005;
29 double step_size =
PI/nb_of_sample;
32 double y_value = tan(
angle);
33 double reference_value = atan2(y_value, 1);
35 ASSERT_LT(fabsf(reference_value-tested_value), max_error_expected) \
36 <<
"atan2 approximation's error is above the expected error : " \
37 << fabsf(reference_value-tested_value);
38 reference_value = atan2(y_value, -1);
40 ASSERT_LT(fabsf(reference_value-tested_value), max_error_expected) \
41 <<
"atan2 approximation's error is above the expected error : " \
42 << fabsf(reference_value-tested_value);