diff --git a/autodiff.hh b/autodiff.hh index de4e02d9..62b4758c 100644 --- a/autodiff.hh +++ b/autodiff.hh @@ -13,6 +13,8 @@ that file for usage examples */ +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES #include #include #include "strides.h" diff --git a/cameramodel-parser.re b/cameramodel-parser.re index 3da87337..37b8d1cf 100644 --- a/cameramodel-parser.re +++ b/cameramodel-parser.re @@ -8,6 +8,10 @@ // // http://www.apache.org/licenses/LICENSE-2.0 + +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include #include diff --git a/mrcal.c b/mrcal.c index 705920d6..fbd0b92b 100644 --- a/mrcal.c +++ b/mrcal.c @@ -6,6 +6,9 @@ // // http://www.apache.org/licenses/LICENSE-2.0 +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include #include diff --git a/poseutils-opencv.c b/poseutils-opencv.c index dbecb1df..a0df80b5 100644 --- a/poseutils-opencv.c +++ b/poseutils-opencv.c @@ -30,6 +30,9 @@ // and on any theory of liability, whether in contract, strict liability, // or tort (including negligence or otherwise) arising in any way out of +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include diff --git a/poseutils.c b/poseutils.c index ad520866..b17563e9 100644 --- a/poseutils.c +++ b/poseutils.c @@ -6,6 +6,9 @@ // // http://www.apache.org/licenses/LICENSE-2.0 +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include #include diff --git a/stereo.c b/stereo.c index 01d48a98..f9197519 100644 --- a/stereo.c +++ b/stereo.c @@ -6,6 +6,9 @@ // // http://www.apache.org/licenses/LICENSE-2.0 +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include "mrcal.h" diff --git a/test/test-cahvor.c b/test/test-cahvor.c index 494918d9..3812a179 100644 --- a/test/test-cahvor.c +++ b/test/test-cahvor.c @@ -1,3 +1,6 @@ +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include #include diff --git a/test/test-harness.h b/test/test-harness.h index 0b2a0040..2cb88792 100644 --- a/test/test-harness.h +++ b/test/test-harness.h @@ -1,5 +1,8 @@ #pragma once +// Apparently I need this in MSVC to get constants +#define _USE_MATH_DEFINES + #include #include #include