#include "xlong.h"
#include "fixed16.h"
#include "fixed.h"
Go to the source code of this file.
Defines | |
#define | PI 3.14159265358979323846 |
Typedefs | |
typedef xlong | XLONG |
typedef fixed16 | FIXED16 |
typedef fixed16 | ANGLE |
typedef XLONG | XMILLIPOINT |
Functions | |
BOOL | InitMaths () |
Initialises the maths class. Windows version tests for maths coprocessor. Also sets up maths exception vectors. | |
XLONG | Mul (const INT32, const INT32) |
Multiplication of two 32-bit signed numbers (xlongs). | |
XLONG | Asl (const INT32, UINT32) |
Performs arithmetic shift left. | |
XLONG | Asr (const INT32, UINT32) |
Performs arithmetic shift right. | |
INT32 | MulDiv32By32 (const INT32, const INT32, const INT32) |
Multiplies two 32-bit values and divides the result by another 32-bit value. | |
fixed16 | Div32By32 (const INT32 a, const INT32 b) |
XLONG CCAPI | MakeXLong (const INT32) |
To convert an INT32 value to an xlong. | |
XLONG CCAPI | MakeXLong (const double) |
To convert a double value to an xlong. |
|
|
|
|
|
|
|
|
|
|
|
Performs arithmetic shift left.
Definition at line 158 of file ccmaths.cpp. 00159 { 00160 XLONG result; 00161 00162 result = MakeXLong(value); 00163 00164 return (result << shift); 00165 00166 }
|
|
Performs arithmetic shift right.
Definition at line 189 of file ccmaths.cpp. 00190 { 00191 return ( XLONG(value) >> shift); 00192 }
|
|
Definition at line 134 of file ccmaths.h. 00135 { 00136 fixed16 v( InternalDiv32by32( a, b ) ); 00137 return v; 00138 }
|
|
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 }
|
|
To convert a double value to an xlong.
Definition at line 263 of file ccmaths.cpp. 00264 { 00265 xlong result; 00266 00267 DoubleToXlong(operand, result); 00268 00269 return result; 00270 }
|
|
To convert an INT32 value to an xlong.
Definition at line 239 of file ccmaths.cpp. 00240 { 00241 return XLONG(operand); 00242 }
|
|
Multiplication of two 32-bit signed numbers (xlongs).
Definition at line 128 of file ccmaths.cpp. 00129 { 00130 XLONG result; 00131 00132 XMul32(operand1, operand2, result); 00133 00134 return result; 00135 }
|
|
Multiplies two 32-bit values and divides the result by another 32-bit value.
Definition at line 215 of file ccmaths.cpp. 00216 { 00217 return Mul32Div32( operand1, operand2, operand3 ); 00218 }
|