#ifndef _STD_LIMITS_H #define _STD_LIMITS_H // from rb3 decomp // Based on https://github.com/SwareJonge/mkdd/blob/main/libs/PowerPC_EABI_Support/include/limits namespace std { template class numeric_limits { public: static T min(); static T max(); }; template <> class numeric_limits { public: static bool min() { return false; } static bool max() { return true; } }; template <> class numeric_limits { public: static char min() { return -0x80; } static char max() { return 0x7F; } }; template <> class numeric_limits { public: static signed char min() { return -0x80; } static signed char max() { return 0x7F; } }; template <> class numeric_limits { public: static unsigned char min() { return 0x0; } static unsigned char max() { return 0xFF; } }; // template <> // class numeric_limits { // public: // static short min() { return -0x8000; } // static short max() { return 0x7FFF; } // }; template <> class numeric_limits { public: static signed short min() { return -0x8000; } static signed short max() { return 0x7FFF; } }; template <> class numeric_limits { public: static unsigned short min() { return 0x0; } static unsigned short max() { return 0xFFFF; } }; // template <> // class numeric_limits { // public: // static int min() { return -0x80000000; } // static int max() { return 0x7FFFFFFF; } // }; template <> class numeric_limits { public: static signed int min() { return -0x80000000; } static signed int max() { return 0x7FFFFFFF; } }; template <> class numeric_limits { public: static unsigned int min() { return 0x0; } static unsigned int max() { return 0xFFFFFFFF; } }; // template <> // class numeric_limits { // public: // static long min() { return -0x80000000; } // static long max() { return 0x7FFFFFFF; } // }; template <> class numeric_limits { public: static signed long min() { return -0x80000000; } static signed long max() { return 0x7FFFFFFF; } }; template <> class numeric_limits { public: static unsigned long min() { return 0x0; } static unsigned long max() { return 0xFFFFFFFF; } }; // template <> // class numeric_limits { // public: // static long long min() { return -0x8000000000000000; } // static long long max() { return 0x7FFFFFFFFFFFFFFF; } // }; template <> class numeric_limits { public: static signed long long min() { return -0x8000000000000000; } static signed long long max() { return 0x7FFFFFFFFFFFFFFF; } }; template <> class numeric_limits { public: static unsigned long long min() { return 0x0; } static unsigned long long max() { return 0xFFFFFFFFFFFFFFFF; } }; } #endif