#include "camtypes.h"
#include "f16spec.h"
#include <math.h>
Go to the source code of this file.
Defines | |
#define | TORADIANS(x) ((x)/180.0*PI) |
#define | PENTIUM_TEST 0 |
Functions | |
DECLARE_SOURCE ("$Revision: 1282 $") | |
BOOL | IsMathCoprocInstalled () |
Gives a hint to those that need to know things about FPU performance. | |
BOOL | InitMaths () |
Initialises the maths class. Windows version tests for maths coprocessor. Also sets up maths exception vectors. | |
Variables | |
static BOOL | MathCoprocInstalled = FALSE |
Flag used to determine if there is a maths coprocessor present. Its default setting is FALSE i.e. there is no coprocessor installed. This is mainly used to hint GDraw how to do things most efficiently. |
|
Definition at line 134 of file f16spec.cpp. |
|
Definition at line 113 of file f16spec.cpp. |
|
|
|
Initialises the maths class. Windows version tests for maths coprocessor. Also sets up maths exception vectors.
Definition at line 249 of file f16spec.cpp. 00250 { 00251 00252 MathCoprocInstalled = IsMathCoprocInstalled(); 00253 00254 #if PENTIUM_TEST 00255 // now check for faulty Pentium 00256 if ( !IsFloatingPointBugFree() ) 00257 { 00258 Error::SetError( _R(IDE_BAD_PENTIUM) ); 00259 InformError(); 00260 } 00261 #endif 00262 00263 return TRUE; 00264 }
|
|
Gives a hint to those that need to know things about FPU performance.
Definition at line 213 of file f16spec.cpp. 00214 { 00215 #if defined(__WXMSW__) 00216 // the theoretically proper way to detect an FPU is to delve into the reigstry thus: 00217 // NT entry lives at HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\FloatingPointProcessor\0 00218 // W95 entry lives at HKEY_LOCAL_MACHINE\Enum\Root\*PNP0C01\0000NDP (M7 liable to change) 00219 // W32s is only available by thunking to WinFlags() (ug). 00220 // Instead, we use a tiny bit of .asm, as suggested by Mr-Asm himself, Gavin 00221 00222 WORD RegCR0; 00223 _asm 00224 { 00225 smsw RegCR0 // bit 2 of CR0 is the EM bit, set for emulation 00226 } 00227 00228 return (RegCR0 & 4) ? FALSE : TRUE; 00229 #else 00230 return TRUE; 00231 #endif 00232 }
|
|
Flag used to determine if there is a maths coprocessor present. Its default setting is FALSE i.e. there is no coprocessor installed. This is mainly used to hint GDraw how to do things most efficiently.
Definition at line 131 of file f16spec.cpp. |