

(Thanks Christina)
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)
__forceinline float tan(float a)
{
return ::tanf(clamp(a, (-1.0f + FUZZY_EPSILON), (1.0f - FUZZY_EPSILON)));
}
__forceinline double tan(double a)
{
return ::tan(clamp(a, (-1.0 + FUZZY_EPSILON), (1.0 - FUZZY_EPSILON)));
}
LRUCacheModel::~LRUCacheModel()
{
for( LRUCacheEntry* entry; entry != NULL; )
{
LRUCacheEntry* next = entry->next;
delete entry;
entry = next;
}
}
// round up to nearest divisible by 8
m_sceneWidth += ((m_sceneWidth&0x7) ^ 0x7) + 1;
m_sceneHeight += ((m_sceneHeight&0x7) ^ 0x7) + 1;
Vec unpackedTransform[4];
#if defined(SPU)
vecLoadHalf8(unpackedTransform[0], unpackedTransform[1], &sourceTransform->data[0]);
unpackedTransform[2] = vecLoadHalf4(&sourceTransform->data[8]);
#else
// get alignment errors with both vecLoadHalf8 and convertHalfToFloat array, so use naive but working method instead
// convertHalfToFloat(reinterpret_cast<float*>(unpackedTransform), &sourceTransform->data[0], 12);
for (uint i=0; i<24; i++)
reinterpret_cast<float*>(unpackedTransform)[i] = convertHalfToFloat(sourceTransform->data[i]);
#endif