summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/common.h')
-rw-r--r--src/core/common.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 73e57c21..d1f71720 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -156,7 +156,7 @@ public:
inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))
-#define PI M_PI
+#define PI (float)M_PI
#define TWOPI (PI*2)
#define HALFPI (PI/2)
#define DEGTORAD(x) ((x) * PI / 180.0f)
@@ -171,8 +171,8 @@ inline float sq(float x) { return x*x; }
int myrand(void);
void mysrand(unsigned int seed);
-void re3_debug(char *format, ...);
-void re3_trace(const char *filename, unsigned int lineno, const char *func, char *format, ...);
+void re3_debug(const char *format, ...);
+void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func);
#define DEBUGBREAK() __debugbreak();
@@ -195,8 +195,8 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
#define BIT(num) (1<<(num))
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-#define min(a, b) (((a) < (b)) ? (a) : (b))
+#define Max(a, b) (((a) > (b)) ? (a) : (b))
+#define Min(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(a) (((a) < 0) ? (-(a)) : (a))
#define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min)))))