Skip to content

Commit

Permalink
Replace non-portable M_PI with constansts::pi()
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCurtis-TRI committed Feb 24, 2020
1 parent 4726598 commit 05db219
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ccd_real_t> rotation(0.05 * M_PI,
const double kPi = constants<double>::pi();
Eigen::AngleAxis<ccd_real_t> rotation(0.05 * kPi,
Vector3<ccd_real_t>::UnitX());
for (int i = 0; i < 4; ++i) {
vertices[i] = rotation * vertices[i];
Expand Down

0 comments on commit 05db219

Please sign in to comment.