mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 11:47:35 +08:00
define FLT_EPSILON; be descriptive about upper_right_triangle() method
This commit is contained in:
+5
-5
@@ -5,15 +5,15 @@ using namespace matrix;
|
||||
|
||||
int main()
|
||||
{
|
||||
TEST(fabs(wrap_pi(4.0) - (4.0 - 2*M_PI)) < __FLT_EPSILON__);
|
||||
TEST(fabs(wrap_pi(-4.0) - (-4.0 + 2*M_PI)) < __FLT_EPSILON__);
|
||||
TEST(fabs(wrap_pi(3.0) - (3.0)) < __FLT_EPSILON__);
|
||||
TEST(fabs(wrap_pi(4.0) - (4.0 - 2*M_PI)) < FLT_EPSILON);
|
||||
TEST(fabs(wrap_pi(-4.0) - (-4.0 + 2*M_PI)) < FLT_EPSILON);
|
||||
TEST(fabs(wrap_pi(3.0) - (3.0)) < FLT_EPSILON);
|
||||
TEST(!is_finite(wrap_pi(1000.0f)));
|
||||
TEST(!is_finite(wrap_pi(-1000.0f)));
|
||||
wrap_pi(NAN);
|
||||
|
||||
TEST(fabs(wrap_2pi(-4.0) - (-4.0 + 2*M_PI)) < __FLT_EPSILON__);
|
||||
TEST(fabs(wrap_2pi(3.0) - (3.0)) < __FLT_EPSILON__);
|
||||
TEST(fabs(wrap_2pi(-4.0) - (-4.0 + 2*M_PI)) < FLT_EPSILON);
|
||||
TEST(fabs(wrap_2pi(3.0) - (3.0)) < FLT_EPSILON);
|
||||
TEST(!is_finite(wrap_2pi(1000.0f)));
|
||||
TEST(!is_finite(wrap_2pi(-1000.0f)));
|
||||
wrap_2pi(NAN);
|
||||
|
||||
Reference in New Issue
Block a user