Skip to content

Commit

Permalink
Replace non-portable M_PI reference with fcl::constants invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Curtis committed Mar 9, 2018
1 parent 7c9f74a commit 7b44a30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_fcl_cylinder_half_space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@

#include <iostream>

#include "fcl/fcl.h"
#include <gtest/gtest.h>

#include "gtest/gtest.h"
#include "fcl/fcl.h"
#include "fcl/math/constants.h"

using namespace std;
using namespace fcl;
Expand Down Expand Up @@ -77,7 +78,8 @@ void test_collision_cylinder_half_space(fcl::GJKSolverType solver_type)
EXPECT_NEAR(contacts[0].penetration_depth, 0.051, kTolerance);

// Now perform the same test but with the cylinder's z axis Cz pointing down.
X_WC.linear() = AngleAxis<S>(M_PI, Vector3d::UnitX()).matrix();
X_WC.linear() = AngleAxis<S>(fcl::constants<S>::pi(),
Vector3d::UnitX()).matrix();
X_WC.translation() = Vector3<S>(0, 0, 0.049);
cylinder_co.setTransform(X_WC);

Expand Down

0 comments on commit 7b44a30

Please sign in to comment.