5 #include <gtest/gtest.h>
9 TEST(AngleUtils, constants)
11 EXPECT_DOUBLE_EQ(boost::math::constants::pi<double>(),
math_utils::PI);
12 EXPECT_DOUBLE_EQ(2*boost::math::constants::pi<double>(), 2*
math_utils::PI);
16 TEST(AngleUtils, conversions)
43 int main(
int argc,
char **argv)
45 testing::InitGoogleTest(&argc, argv);
46 return RUN_ALL_TESTS();
static constexpr double HALF_PI
Define PI/2.
double wrapAngleToPi(const double &_rad)
The wrapAngleToPi function wraps an input angle to the interval [-pi, pi).
double degToRad(const double &_deg)
The degToRad function converts degrees to radians.
double angleDiff(const double &_ang1, const double &_ang2)
The angleDiff function returns the difference in angle between two given angles in the interval [0,...
static constexpr double THREE_QUARTERS_PI
Define 3PI/4.
double radToDeg(const double &_rad)
The radToDeg function converts radians to degrees.
static constexpr double TWO_PI
Define 2PI.
static constexpr double PI
Define PI.
double wrapAngleTo2Pi(const double &_rad)
The wrapAngleTo2Pi function wraps an input angle to the interval [0, 2pi).
int main(int argc, char **argv)
TEST(AngleUtils, constants)