changed min/max to one function each (if it's missing) to remove ambiguity

This commit is contained in:
Steve Checkoway
2003-04-20 12:52:45 +00:00
parent ace71ae2d2
commit 09d633005f
+4 -4
View File
@@ -25,14 +25,14 @@
#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); }
/* Common harmless mismatches. */
/* replace both with a single function (same with max)
* --Steve */
#ifndef min
inline float min(float a, int b) { return a < b? a:b; }
inline float min(int a, float b) { return a < b? a:b; }
inline float min(float a, float b) { return a < b? a:b; }
#endif
#ifndef max
inline float max(float a, int b) { return a > b? a:b; }
inline float max(int a, float b) { return a > b? a:b; }
inline float max(float a, float b) { return a > b? a:b; }
#endif
/* Traditional defines. Only use this if you absolutely need