Skip to content

Commit 7b4f6a8

Browse files
committed
fixed compilation error for windows
1 parent b8b87c0 commit 7b4f6a8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drone_control/common/include/frame_types.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#ifndef _FRAME_TYPES_HPP_
22
#define _FRAME_TYPES_HPP_
33

4-
#ifndef M_PI
5-
#define M_PI 3.14159265358979323846
4+
#ifdef WIN32
5+
#define _USE_MATH_DEFINES
66
#endif
7+
#include <cmath>
8+
//#ifndef M_PI
9+
//#define M_PI 3.14159265358979323846
10+
//#endif
711

8-
// M_PI を使えるようになります
912
#define DEGREE2RADIAN(v) ( (v) * M_PI / (180.0) )
1013
#define RADIAN2DEGREE(v) ( (180.0 * (v)) / M_PI )
1114
#define RPM2EULER_RATE(v) ( ((v) * 2 * M_PI) / 60.0 )

0 commit comments

Comments
 (0)