File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 37
37
38
38
#include " binary.h"
39
39
40
+ #if defined(__cplusplus)
41
+ constexpr double PI = 3.1415926535897932384626433832795 ,
42
+ HALF_PI = 1.5707963267948966192313216916398 ,
43
+ TWO_PI = 6.283185307179586476925286766559 ,
44
+ DEG_TO_RAD = 0.017453292519943295769236907684886 ,
45
+ RAD_TO_DEG = 57.295779513082320876798154814105 ,
46
+ EULER = 2.718281828459045235360287471352 ;
47
+ #define PI PI
48
+ #define HALF_PI HALF_PI
49
+ #define TWO_PI TWO_PI
50
+ #define DEG_TO_RAD DEG_TO_RAD
51
+ #define RAD_TO_DEG RAD_TO_DEG
52
+ #define EULER EULER
53
+ #else
40
54
#define PI 3.1415926535897932384626433832795
41
55
#define HALF_PI 1.5707963267948966192313216916398
42
56
#define TWO_PI 6.283185307179586476925286766559
43
57
#define DEG_TO_RAD 0.017453292519943295769236907684886
44
58
#define RAD_TO_DEG 57.295779513082320876798154814105
45
59
#define EULER 2.718281828459045235360287471352
60
+ #endif
46
61
47
62
#ifdef __cplusplus
48
63
extern " C" {
You can’t perform that action at this time.
0 commit comments