From 5f8167ac7b671bb685d1169369c8a6384483c2af Mon Sep 17 00:00:00 2001 From: Sean Curtis Date: Mon, 24 Feb 2020 09:47:23 -0800 Subject: [PATCH] Replace non-portable M_PI with constants::pi() (#450) * Replace non-portable M_PI with constansts::pi() --- CHANGELOG.md | 5 +++++ .../convexity_based_algorithm/test_gjk_libccd-inl_epa.cpp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff6991676..3d1204e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ### FCL 0.7.0 (????-??-??) +* Math + + * Replace M_PI instance with constants::pi(): + [#450](https://github.com/flexible-collision-library/fcl/pull/450) + * Narrowphase * Various corrections and clarifications of the GJK algorithm used for general diff --git a/test/narrowphase/detail/convexity_based_algorithm/test_gjk_libccd-inl_epa.cpp b/test/narrowphase/detail/convexity_based_algorithm/test_gjk_libccd-inl_epa.cpp index b8ea645d9..769452d8e 100644 --- a/test/narrowphase/detail/convexity_based_algorithm/test_gjk_libccd-inl_epa.cpp +++ b/test/narrowphase/detail/convexity_based_algorithm/test_gjk_libccd-inl_epa.cpp @@ -257,7 +257,8 @@ GTEST_TEST(FCL_GJK_EPA, faceNormalPointingOutwardOriginNearFace1) { vertices[1] << 0, 1, face0_origin_distance; vertices[2] << -0.5, -0.5, face0_origin_distance; vertices[3] << 0, 0, -1; - Eigen::AngleAxis rotation(0.05 * M_PI, + const double kPi = constants::pi(); + Eigen::AngleAxis rotation(0.05 * kPi, Vector3::UnitX()); for (int i = 0; i < 4; ++i) { vertices[i] = rotation * vertices[i];