Skip to content

Commit 4390089

Browse files
committed
Added _USE_MATH_DEFINES for MSVC compile
1 parent 06539c4 commit 4390089

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ArduinoCore-API/api/ArduinoAPI.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
#include <stdint.h>
4545
#include <stdbool.h>
4646
#include <string.h>
47+
48+
#if defined(_MSC_VER) && !defined(M_PI) && !defined(_USE_MATH_DEFINES)
49+
#define _USE_MATH_DEFINES
50+
#endif
51+
4752
#include <math.h>
4853

4954
#ifdef __cplusplus

0 commit comments

Comments
 (0)