diff options
-rw-r--r-- | snowglobe-internal.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/snowglobe-internal.h b/snowglobe-internal.h index 1e68d2a..af082ac 100644 --- a/snowglobe-internal.h +++ b/snowglobe-internal.h @@ -1,16 +1,6 @@ #ifndef _SNOWGLOBE_INTERNAL_H #define _SNOWGLOBE_INTERNAL_H -#define RAD 57.296 -#define RRAD 0.01745 - -/* some constants */ -#define PI 3.14159265358979323846 -#define PIdiv2 1.57079632679489661923 -#define toDegrees 57.2957795130823208768 -#define toRadians 0.01745329251994329577 - - #define LRAND() ((long) (random() & 0x7fffffff)) #define NRAND(n) ((int) (LRAND() % (n))) #define MAXRAND (2147483648.0) /* unsigned 1<<31 as a float */ @@ -19,6 +9,12 @@ #include <math.h> #include <float.h> +/* some constants */ +#define PI M_PI +#define PIdiv2 M_PI_2 +#define toDegrees (180.0f * M_1_PI) +#define toRadians (M_PI / 180.0f) + //return random number in range [0,x) #define randf(x) ((float) (rand()/(((double)RAND_MAX + 1)/(x)))) |