Define M_PI if not exist

This commit is contained in:
Edgaru089 2024-04-16 10:24:44 +08:00
parent 469d02f166
commit bb46e2515f

View File

@ -12,6 +12,11 @@
#include <stdlib.h> #include <stdlib.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
static inline double dabs(double x) { static inline double dabs(double x) {
return x < 0.0 ? -x : x; return x < 0.0 ? -x : x;
} }