Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
limits.h
Go to the documentation of this file.
1#ifndef _STD_LIMITS_H
2#define _STD_LIMITS_H
3
4#include "float.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define CHAR_BIT 8
11
12#define SCHAR_MIN (-0x7F - 1)
13#define SCHAR_MAX 0x7F
14#define UCHAR_MAX 0xFF
15
16#define CHAR_MIN 0
17#define CHAR_MAX SCHAR_MAX
18
19#define SHRT_MIN (-0x7FFF - 1)
20#define SHRT_MAX 0x7FFF
21#define USHRT_MAX 0xFFFF
22
23#define INT_MIN (-0x7FFFFFFF - 1)
24#define INT_MAX 0x7FFFFFFF
25#define UINT_MAX 0xFFFFFFFF
26
27#define LONG_MIN (-0x7FFFFFFFL - 1)
28#define LONG_MAX 0x7FFFFFFFL
29#define ULONG_MAX 0xFFFFFFFFUL
30
31#define LLONG_MIN (-0x7FFFFFFFFFFFFFFFLL - 1)
32#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
33#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
34
35#ifdef __cplusplus
36}
37
38namespace std {
39template <typename T>
41public:
42 inline static T min();
43 inline static T max();
44};
45
46template <>
47class numeric_limits<char> {
48public:
49 inline static char min() { return -0x80; }
50 inline static char max() { return 0x7F; }
51};
52
53template <>
54class numeric_limits<short> {
55public:
56 inline static short min() { return -0x8000; }
57 inline static short max() { return 0x7FFF; }
58};
59
60template <>
61class numeric_limits<int> {
62public:
63 inline static int min() { return -0x80000000; }
64 inline static int max() { return 0x7FFFFFFF; }
65};
66
67template <>
68class numeric_limits<long> {
69public:
70 inline static long min() { return -0x80000000; }
71 inline static long max() { return 0x7FFFFFFF; }
72};
73
74template <>
75class numeric_limits<unsigned char> {
76public:
77 inline static unsigned char min() { return 0x0; }
78 inline static unsigned char max() { return 0xFF; }
79};
80
81template <>
82class numeric_limits<unsigned short> {
83public:
84 inline static unsigned short min() { return 0x0; }
85 inline static unsigned short max() { return 0xFFFF; }
86};
87
88template <>
89class numeric_limits<unsigned int> {
90public:
91 inline static unsigned int min() { return 0x0; }
92 inline static unsigned int max() { return 0xFFFFFFFF; }
93};
94
95template <>
96class numeric_limits<unsigned long> {
97public:
98 inline static unsigned long min() { return 0x0; }
99 inline static unsigned long max() { return 0xFFFFFFFF; }
100};
101
102template <>
103class numeric_limits<float> {
104public:
105 inline static float min();
106 inline static float max() { return FLT_MAX; }
107};
108
109} // namespace std
110#endif
111#endif
static char max()
Definition limits.h:50
static char min()
Definition limits.h:49
static float max()
Definition limits.h:106
static int min()
Definition limits.h:63
static int max()
Definition limits.h:64
static long max()
Definition limits.h:71
static long min()
Definition limits.h:70
static short max()
Definition limits.h:57
static short min()
Definition limits.h:56
static unsigned char max()
Definition limits.h:78
static unsigned char min()
Definition limits.h:77
static unsigned int min()
Definition limits.h:91
static unsigned int max()
Definition limits.h:92
static unsigned long max()
Definition limits.h:99
static unsigned long min()
Definition limits.h:98
static unsigned short min()
Definition limits.h:84
static unsigned short max()
Definition limits.h:85
Definition limits.h:40
Definition JMATrigonometric.cpp:12