Rev | Line | |
---|
[37] | 1 | /* |
---|
| 2 | * sl_val.H |
---|
| 3 | * |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef SL_VAL_H |
---|
| 7 | #define SL_VAL_H |
---|
| 8 | |
---|
| 9 | //#include <values.h> |
---|
| 10 | #include <float.h> |
---|
| 11 | #include <limits.h> |
---|
| 12 | #include <math.h> |
---|
| 13 | |
---|
| 14 | typedef int Integer; |
---|
| 15 | typedef unsigned char UnsignedInteger8; |
---|
| 16 | typedef signed char Integer8; |
---|
| 17 | typedef short Integer16; |
---|
| 18 | typedef int Integer32; |
---|
| 19 | typedef long IntegerPS; |
---|
| 20 | typedef float Real; |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | #ifdef LINUX |
---|
| 24 | |
---|
| 25 | #define CeilR2I(x) ((Integer) ceil(x)) |
---|
| 26 | #define Abs(x) (fabs(x)) |
---|
| 27 | |
---|
| 28 | #else |
---|
| 29 | |
---|
| 30 | #define CeilR2I(x) ((Integer) ceilf(x)) |
---|
| 31 | #define Abs(x) (fabs(x)) |
---|
| 32 | |
---|
| 33 | #endif |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | #define MAX_SCREEN_DIMENSION 1280 |
---|
| 37 | |
---|
| 38 | #define SMALLEST_INTEGER 0x80000000 |
---|
| 39 | #define REAL_ONE 1.0f |
---|
| 40 | |
---|
| 41 | #define REAL_TOTAL_BITS 32 |
---|
| 42 | #define REAL_MANTISSA_BITS 23 |
---|
| 43 | #define REAL_NON_MANTISSA_BITS 9 |
---|
| 44 | #define REAL_EXPONENT_BIAS 127 |
---|
| 45 | #define REAL_MANTISSA_MASK 0x007fffff |
---|
| 46 | #define REAL_POW_MANTISSA_BITS 1.1920928955078125e-07f |
---|
| 47 | |
---|
| 48 | #endif /* VAL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.