define M_PI if not defined in math.h

This commit is contained in:
Pernilla
2025-07-22 10:51:39 +02:00
committed by Eric Katzfey
parent 7e5cc020c3
commit d70eecc17d
6 changed files with 19 additions and 17 deletions
@@ -143,7 +143,9 @@ __END_DECLS
/* The M_PI, as stated above, is not C standard. If you need it and
* it isn't in your math.h file then you can use this instead. */
#define M_PI_PRECISE 3.141592653589793238462643383279502884
#ifndef M_PI
#define M_PI 3.141592653589793238462643383279502884
#endif
#define M_DEG_TO_RAD 0.017453292519943295
#define M_RAD_TO_DEG 57.295779513082323