D:/Zythum/DinoKod/Common/Math.h

00001 #ifndef __MATH_H__
00002 #define __MATH_H__
00003 
00004 #include "Common/CommonDll.h"
00005 
00006 //--------------------------------------------------------------------------------------------------------------------------
00007 #ifdef _LINUX
00008 #define FASTCALL __stdcall
00009 #else
00010 #define FASTCALL __fastcall
00011 #endif // _LINUX
00012 //--------------------------------------------------------------------------------------------------------------------------
00013 #define SQR( _x )       ( (_x) * (_x) )
00014 
00015 //--------------------------------------------------------------------------------------------------------------------------
00016 __declspec(naked) __forceinline float FastAbs( float a )
00017 {
00018         __asm
00019         {
00020                 fld             DWORD PTR [esp+4] 
00021                 fabs
00022                 ret 0
00023         }
00024 }
00025 
00026 //--------------------------------------------------------------------------------------------------------------------------
00027 __declspec(naked) __forceinline float FastSin( float a )
00028 {
00029         __asm
00030         {
00031                 fld             DWORD PTR [esp+4] 
00032                 fsin
00033                 ret 0
00034         }
00035 }
00036 
00037 //--------------------------------------------------------------------------------------------------------------------------
00038 __declspec(naked) __forceinline float FastCos( float a )
00039 {
00040         __asm
00041         {
00042                 fld             DWORD PTR [esp+4] 
00043                 fcos
00044                 ret 0
00045         }
00046 }
00047 
00048 /*extern float FASTCALL FastAbs( float a );
00049 extern float FASTCALL FastSin( float a );
00050 extern float FASTCALL FastCos( float a );*/
00051 
00052 #endif //       __MATH_H__

Generated on Sun Mar 25 20:02:10 2007 for Zythum Project by  doxygen 1.5.1-p1