Implement tests for Euler conversion with jets

https://github.com/ceres-solver/ceres-solver/issues/965

Change-Id: I6bdabf5ee09c000e49ea1757fde724d4bc4ccb92
This commit is contained in:
Hs293Go
2023-04-22 02:48:39 -04:00
parent db1ebd3ff5
commit 96fdfd2e7a
2 changed files with 561 additions and 36 deletions
+1 -1
View File
@@ -610,7 +610,7 @@ void RotationMatrixToEulerAngles(
// [-pi, pi) x [0, pi / 2) x [-pi, pi)
// which is enforced here
if constexpr (EulerSystem::kIsProperEuler) {
const T kPi(constants::pi_v<T>);
const T kPi(constants::pi_v<double>);
const T kTwoPi(2.0 * kPi);
if (euler[1] < T(0.0) || ea[1] > kPi) {
euler[0] += kPi;