Skip to content
Browse files

move numberof() and domain_error()

  • Loading branch information...
1 parent 234e05e commit 54b7b3804e34353892fef60fb7d7bd283544a3ee @Watson1978 Watson1978 committed Dec 27, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 math.c
View
8 math.c
@@ -9,12 +9,11 @@
#include <math.h>
#include <errno.h>
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+
VALUE rb_mMath;
VALUE rb_eMathDomainError;
-#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
-#define domain_error(msg) \
- rb_raise(rb_eMathDomainError, "Numerical argument is out of domain - " #msg);
static VALUE
to_flo(VALUE x)
@@ -38,6 +37,9 @@ to_flo(VALUE x)
Need_Float(y);\
} while (0)
+#define domain_error(msg) \
+ rb_raise(rb_eMathDomainError, "Numerical argument is out of domain - " #msg);
+
/*
* call-seq:
* Math.atan2(y, x) -> float

0 comments on commit 54b7b38

Please sign in to comment.
Something went wrong with that request. Please try again.