Port Ceres to Windows
This is a preliminary, but full, port of Ceres to Windows.
Currently all tests compile and run, with only system_test
failing to work correctly due to a path issue.
Change-Id: I4152c1588bf51ffd7f4d9401ef9759f5d28c299c
diff --git a/include/ceres/rotation.h b/include/ceres/rotation.h
index 834ca45..6c0d58e 100644
--- a/include/ceres/rotation.h
+++ b/include/ceres/rotation.h
@@ -327,7 +327,8 @@
inline void EulerAnglesToRotationMatrix(const T* euler,
const int row_stride,
T* R) {
- const T degrees_to_radians(M_PI / 180.0);
+ const double kPi = 3.14159265358979323846;
+ const T degrees_to_radians(kPi / 180.0);
const T pitch(euler[0] * degrees_to_radians);
const T roll(euler[1] * degrees_to_radians);
@@ -509,4 +510,5 @@
}
} // namespace ceres
+
#endif // CERES_PUBLIC_ROTATION_H_