Skip to content

Commit eee7ea1

Browse files
committed
Add PI_DOUBLE separately for deg/rad macros
Hopefully undoes some regressions
1 parent b706ecf commit eee7ea1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/SB/Core/x/xMath.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
// #undef ONEEIGHTY
2222
// #define PI _771_1
2323
// #define ONEEIGHTY _778_0
24-
#define PI 3.141592653589793
24+
#define PI 3.1415927f
25+
#define PI_DOUBLE 3.141592653589793
2526
#define ONEEIGHTY 180.0f
2627

27-
#define DEG2RAD(x) ((PI) * (x) / (ONEEIGHTY))
28-
#define RAD2DEG(x) ((ONEEIGHTY) * (x) / (PI))
28+
#define DEG2RAD(x) ((PI_DOUBLE) * (x) / (ONEEIGHTY))
29+
#define RAD2DEG(x) ((ONEEIGHTY) * (x) / (PI_DOUBLE))
2930

3031
#define FLOAT_MAX 1e38f
3132
#define FLOAT_MIN -1e38f

0 commit comments

Comments
 (0)