the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3
4class Byte
5{
6public:
7 static const char MAX_VALUE = CHAR_MAX;
8 static const char MIN_VALUE = CHAR_MIN;
9};
10
11class Short
12{
13public:
14 static const short MAX_VALUE = SHRT_MAX;
15 static const short MIN_VALUE = SHRT_MIN;
16};
17
18class Integer
19{
20public:
21 static const int MAX_VALUE = INT_MAX;
22 static int parseInt(wstring &str, int radix = 10);
23};
24
25class Float
26{
27public:
28 static const float MAX_VALUE;
29 static int floatToIntBits( float value )
30 {
31 return *(int *)&value;
32 }
33 static int floatToRawIntBits( float value )
34 {
35 return *(int *)&value;
36 }
37
38 static float intBitsToFloat( int bits )
39 {
40 return *(float *)&bits;
41 }
42
43 static const float POSITIVE_INFINITY;
44};
45
46class Double
47{
48public:
49 static const double MAX_VALUE;
50 static const double MIN_NORMAL;
51
52 static bool isNaN( double a ) {
53#ifdef __PS3__
54 return isnan(a);
55#else
56 return ( a != a );
57#endif
58 }
59 static bool isInfinite( double a ) { return false; /*4J TODO*/ }
60
61 static double longBitsToDouble( __int64 bits )
62 {
63 return *(double *)&bits;
64 }
65
66 static __int64 doubleToLongBits( double d )
67 {
68 return *(__int64 *)&d;
69 }
70};
71
72// 4J Stu - The String class should only be used if we need to use the BaseClass::class type
73// As such I have renamed it so that we don't confuse it with places where we should use std::string
74class _String
75{
76};