commit | db1ebd3ff550725f5e4bff5501f6b1de73afc36f | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Tue Apr 18 16:26:11 2023 -0700 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Tue Apr 18 16:26:24 2023 -0700 |
tree | 1b39abf4a788b21f4be9cb34556406a5f037bada | |
parent | 16a4fa04e2e94c970702a5b001ff8f4fabcda6a0 [diff] |
Work around lack of constexpr constructors for Jet https://github.com/ceres-solver/ceres-solver/issues/965 Change-Id: Ia74a64568815605586c1f326a55cc36b09f33f30
diff --git a/include/ceres/rotation.h b/include/ceres/rotation.h index a518ec8..b7061c5 100644 --- a/include/ceres/rotation.h +++ b/include/ceres/rotation.h
@@ -610,8 +610,8 @@ // [-pi, pi) x [0, pi / 2) x [-pi, pi) // which is enforced here if constexpr (EulerSystem::kIsProperEuler) { - constexpr T kPi = constants::pi_v<T>; - constexpr T kTwoPi(2.0 * kPi); + const T kPi(constants::pi_v<T>); + const T kTwoPi(2.0 * kPi); if (euler[1] < T(0.0) || ea[1] > kPi) { euler[0] += kPi; euler[1] = -euler[1];