inline round

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2354 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-08-22 20:40:42 +00:00
parent 11dba13932
commit 950c31f50d
2 changed files with 2 additions and 3 deletions
-2
View File
@@ -277,5 +277,3 @@ bool isbigendian()
return !(*((char *)(&one)));
}
float round(float x) { return floor(x + 0.5f); }
+2 -1
View File
@@ -49,6 +49,8 @@ static inline T min(T a, T b)
return a < b ? a : b;
}
static inline float round(float x) { return floor(x + 0.5f); }
#define clamp(a,b,c) (max(b, min(a, c)))
#define rnd(max) (rand()%(max))
#define rndreset() (srand(1))
@@ -508,7 +510,6 @@ extern bool cmpb(void *b, int n, enet_uint32 c);
extern bool cmpf(char *fn, enet_uint32 c);
extern void endianswap(void *, int, int);
extern bool isbigendian();
extern float round(float x);
#endif