changed min/max to one function each (if it's missing) to remove ambiguity
This commit is contained in:
@@ -25,14 +25,14 @@
|
|||||||
#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); }
|
#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); }
|
||||||
|
|
||||||
/* Common harmless mismatches. */
|
/* Common harmless mismatches. */
|
||||||
|
/* replace both with a single function (same with max)
|
||||||
|
* --Steve */
|
||||||
#ifndef min
|
#ifndef min
|
||||||
inline float min(float a, int b) { return a < b? a:b; }
|
inline float min(float a, float b) { return a < b? a:b; }
|
||||||
inline float min(int a, float b) { return a < b? a:b; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef max
|
#ifndef max
|
||||||
inline float max(float a, int b) { return a > b? a:b; }
|
inline float max(float a, float b) { return a > b? a:b; }
|
||||||
inline float max(int a, float b) { return a > b? a:b; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Traditional defines. Only use this if you absolutely need
|
/* Traditional defines. Only use this if you absolutely need
|
||||||
|
|||||||
Reference in New Issue
Block a user