From 52003c590fafa3e1253e8f5e21adb6467d076b04 Mon Sep 17 00:00:00 2001
From: Kaitlyn Lee <kdl222@nau.edu>
Date: Thu, 5 Dec 2019 13:42:49 -0700
Subject: [PATCH] Capitalized enum values.

---
 include/Rotation.h            | 4 ++--
 src/Rotation.cpp              | 4 ++--
 tests/ctests/RotationTest.cpp | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/Rotation.h b/include/Rotation.h
index 49f0958..b1d6707 100644
--- a/include/Rotation.h
+++ b/include/Rotation.h
@@ -7,8 +7,8 @@
 namespace ale {
 
   enum RotationInterpolation {
-    slerp, // Spherical interpolation
-    nlerp // Normalized linear interpolation
+    SLERP, // Spherical interpolation
+    NLERP // Normalized linear interpolation
   };
 
   /**
diff --git a/src/Rotation.cpp b/src/Rotation.cpp
index 46d68e0..ef646ea 100644
--- a/src/Rotation.cpp
+++ b/src/Rotation.cpp
@@ -249,10 +249,10 @@ namespace ale {
   ) const {
     Eigen::Quaterniond interpQuat;
     switch (interpType) {
-      case slerp:
+      case SLERP:
         interpQuat = m_impl->quat.slerp(t, nextRotation.m_impl->quat);
         break;
-      case nlerp:
+      case NLERP:
         interpQuat = Eigen::Quaterniond(
               linearInterpolate(m_impl->quat.w(), nextRotation.m_impl->quat.w(), t),
               linearInterpolate(m_impl->quat.x(), nextRotation.m_impl->quat.x(), t),
diff --git a/tests/ctests/RotationTest.cpp b/tests/ctests/RotationTest.cpp
index e8b8390..8b81340 100644
--- a/tests/ctests/RotationTest.cpp
+++ b/tests/ctests/RotationTest.cpp
@@ -390,7 +390,7 @@ TEST(RotationTest, MultiplyRotation) {
 TEST(RotationTest, Slerp) {
   Rotation rotationOne(0.5, 0.5, 0.5, 0.5);
   Rotation rotationTwo(-0.5, 0.5, 0.5, 0.5);
-  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 0.125, ale::slerp);
+  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 0.125, ale::SLERP);
   vector<double> quat = interpRotation.toQuaternion();
   ASSERT_EQ(quat.size(), 4);
   EXPECT_NEAR(quat[0], cos(M_PI * 3.0/8.0), 1e-10);
@@ -402,7 +402,7 @@ TEST(RotationTest, Slerp) {
 TEST(RotationTest, SlerpExtrapolate) {
   Rotation rotationOne(0.5, 0.5, 0.5, 0.5);
   Rotation rotationTwo(-0.5, 0.5, 0.5, 0.5);
-  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 1.125, ale::slerp);
+  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 1.125, ale::SLERP);
   vector<double> quat = interpRotation.toQuaternion();
   ASSERT_EQ(quat.size(), 4);
   EXPECT_NEAR(quat[0], cos(M_PI * 17.0/24.0), 1e-10);
@@ -414,7 +414,7 @@ TEST(RotationTest, SlerpExtrapolate) {
 TEST(RotationTest, Nlerp) {
   Rotation rotationOne(0.5, 0.5, 0.5, 0.5);
   Rotation rotationTwo(-0.5, 0.5, 0.5, 0.5);
-  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 0.125, ale::nlerp);
+  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 0.125, ale::NLERP);
   double scaling = 8.0 / sqrt(57.0);
   vector<double> quat = interpRotation.toQuaternion();
   ASSERT_EQ(quat.size(), 4);
@@ -427,7 +427,7 @@ TEST(RotationTest, Nlerp) {
 TEST(RotationTest, NlerpExtrapolate) {
   Rotation rotationOne(0.5, 0.5, 0.5, 0.5);
   Rotation rotationTwo(-0.5, 0.5, 0.5, 0.5);
-  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 1.125, ale::nlerp);
+  Rotation interpRotation = rotationOne.interpolate(rotationTwo, 1.125, ale::NLERP);
   double scaling = 8.0 / sqrt(73.0);
   vector<double> quat = interpRotation.toQuaternion();
   ASSERT_EQ(quat.size(), 4);
-- 
GitLab