Epic failures in the game development field.
This blog covers funny/weird issues and bugs from games that happened during development.
Send your own contributions to igetyourfail at repi.se (can be anonymous if specified)
Saturday, July 4, 2009
inline int MyMath::floatToIntRounded(hkReal value)
const hkReal lowerWhole = floor(value);
const hkReal upperWhole = ceil(value);
if((value - lowerWhole) < (upperWhole - value))
return floatToInt(lowerWhole + MY_EPSILON);
return floatToInt(upperWhole + MY_EPSILON);
- ▼ July (3)