Panda3D
numeric_types.h
1 // Filename: numeric_types.h
2 // Created by: drose (06Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef NUMERIC_TYPES_H
16 #define NUMERIC_TYPES_H
17 
18 #include "dtoolbase.h"
19 
20 // This header file defines a number of typedefs that correspond to
21 // the various numeric types for unsigned and signed numbers of
22 // various widths.
23 
24 #if defined(WIN32_VC) && !defined(CPPPARSER)
25 typedef signed __int8 PN_int8;
26 typedef signed __int16 PN_int16;
27 typedef signed __int32 PN_int32;
28 typedef signed __int64 PN_int64;
29 
30 typedef unsigned __int8 PN_uint8;
31 typedef unsigned __int16 PN_uint16;
32 typedef unsigned __int32 PN_uint32;
33 typedef unsigned __int64 PN_uint64;
34 
35 #else
36 
37 typedef signed char PN_int8;
38 typedef short int PN_int16;
39 typedef int PN_int32;
40 typedef long long int PN_int64;
41 
42 typedef unsigned char PN_uint8;
43 typedef unsigned short int PN_uint16;
44 typedef unsigned int PN_uint32;
45 typedef unsigned long long int PN_uint64;
46 
47 #endif
48 
49 typedef double PN_float64;
50 typedef float PN_float32;
51 
52 #ifndef STDFLOAT_DOUBLE
53 // The default setting--single-precision floats.
54 typedef float PN_stdfloat;
55 #else // STDFLOAT_DOUBLE
56 // The specialty setting--double-precision floats.
57 typedef double PN_stdfloat;
58 #endif // STDFLOAT_DOUBLE
59 
60 #endif
61