mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 09:49:36 +00:00
arm64 detect marcos
This commit is contained in:
@@ -457,6 +457,8 @@ void inline SinCos( float radians, float *sine, float *cosine )
|
||||
#elif defined( PLATFORM_WINDOWS_PC64 )
|
||||
*sine = sin( radians );
|
||||
*cosine = cos( radians );
|
||||
#elif defined( OSX )
|
||||
__sincosf(radians, sine, cosine);
|
||||
#elif defined( POSIX )
|
||||
sincosf(radians, sine, cosine);
|
||||
#endif
|
||||
@@ -1213,7 +1215,7 @@ FORCEINLINE int RoundFloatToInt(float f)
|
||||
};
|
||||
flResult = __fctiw( f );
|
||||
return pResult[1];
|
||||
#elif defined (__arm__)
|
||||
#elif defined (__arm__) || defined (__arm64__)
|
||||
return (int)(f + 0.5f);
|
||||
#else
|
||||
#error Unknown architecture
|
||||
@@ -1245,7 +1247,7 @@ FORCEINLINE unsigned long RoundFloatToUnsignedLong(float f)
|
||||
Assert( pIntResult[1] >= 0 );
|
||||
return pResult[1];
|
||||
#else // !X360
|
||||
#ifdef __arm__
|
||||
#if defined(__arm__) || defined(__arm64__)
|
||||
return (unsigned long)(f + 0.5f);
|
||||
#elif defined( PLATFORM_WINDOWS_PC64 )
|
||||
uint nRet = ( uint ) f;
|
||||
@@ -2168,7 +2170,7 @@ inline bool CloseEnough( const Vector &a, const Vector &b, float epsilon = EQUAL
|
||||
// Fast compare
|
||||
// maxUlps is the maximum error in terms of Units in the Last Place. This
|
||||
// specifies how big an error we are willing to accept in terms of the value
|
||||
// of the least significant digit of the floating point number’s
|
||||
// of the least significant digit of the floating point number�s
|
||||
// representation. maxUlps can also be interpreted in terms of how many
|
||||
// representable floats we are willing to accept between A and B.
|
||||
// This function will allow maxUlps-1 floats between A and B.
|
||||
|
||||
Reference in New Issue
Block a user