summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/math.c b/math.c
index 5461763..e3a78f7 100644
--- a/math.c
+++ b/math.c
@@ -51,6 +51,9 @@ extern VALUE rb_to_float(VALUE val);
static VALUE
math_atan2(VALUE obj, VALUE y, VALUE x)
{
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
double dx, dy;
Need_Float2(y, x);
dx = RFLOAT_VALUE(x);