mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Modified SDK for GCC 4.2
This commit is contained in:
@ -150,7 +150,7 @@ void CBitWrite::WriteBytes( const void *pBuf, int nBytes )
|
||||
void CBitWrite::WriteBitCoord (const float f)
|
||||
{
|
||||
int signbit = (f <= -COORD_RESOLUTION);
|
||||
int intval = (int)abs(f);
|
||||
int intval = (int)fabs(f);
|
||||
int fractval = abs((int)(f*COORD_DENOMINATOR)) & (COORD_DENOMINATOR-1);
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ void CBitWrite::WriteBitCoord (const float f)
|
||||
void CBitWrite::WriteBitCoordMP (const float f, bool bIntegral, bool bLowPrecision )
|
||||
{
|
||||
int signbit = (f <= -( bLowPrecision ? COORD_RESOLUTION_LOWPRECISION : COORD_RESOLUTION ));
|
||||
int intval = (int)abs(f);
|
||||
int intval = (int)fabs(f);
|
||||
int fractval = bLowPrecision ?
|
||||
( abs((int)(f*COORD_DENOMINATOR_LOWPRECISION)) & (COORD_DENOMINATOR_LOWPRECISION-1) ) :
|
||||
( abs((int)(f*COORD_DENOMINATOR)) & (COORD_DENOMINATOR-1) );
|
||||
|
Reference in New Issue
Block a user