aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Mth.h
diff options
context:
space:
mode:
authordaoge <3523206925@qq.com>2026-03-03 03:04:10 +0800
committerGitHub <noreply@github.com>2026-03-03 03:04:10 +0800
commitb3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch)
tree267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/Mth.h
parent84c31a2331f7a0ec85b9d438992e244f60e5020f (diff)
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/Mth.h')
-rw-r--r--Minecraft.World/Mth.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/Minecraft.World/Mth.h b/Minecraft.World/Mth.h
index 17119fb1..4ce90893 100644
--- a/Minecraft.World/Mth.h
+++ b/Minecraft.World/Mth.h
@@ -4,13 +4,16 @@ class Mth
{
private:
static const int BIG_ENOUGH_INT;
- static const float BIG_ENOUGH_FLOAT;
-
-public:
- static const float RAD_TO_GRAD;
+ static const float BIG_ENOUGH_FLOAT;
public:
static const float DEGRAD;
static const float RADDEG;
+ static const float RAD_TO_GRAD;
+
+ static const __int64 UUID_VERSION = 0x000000000000f000L;
+ static const __int64 UUID_VERSION_TYPE_4 = 0x0000000000004000L;
+ static const __int64 UUID_VARIANT = 0xc000000000000000L;
+ static const __int64 UUID_VARIANT_2 = 0x8000000000000000L;
private:
static float *_sin;
private:
@@ -18,24 +21,31 @@ private:
public :
static void init(); // 4J added
static float sin(float i);
- static float cos(float i);
- static float sqrt(float x);
- static float sqrt(double x);
- static int floor(float v);
+ static float cos(float i);
+ static float sqrt(float x);
+ static float sqrt(double x);
+ static int floor(float v);
static __int64 lfloor(double v);
- static int fastFloor(double x);
- static int floor(double v);
- static int absFloor(double v);
- static float abs(float v);
+ static int fastFloor(double x);
+ static int floor(double v);
+ static int absFloor(double v);
+ static float abs(float v);
static int abs(int v);
- static int ceil(float v);
+ static int ceil(float v);
static int clamp(int value, int min, int max) ;
static float clamp(float value, float min, float max);
- static double asbMax(double a, double b);
- static int intFloorDiv(int a, int b);
- static int nextInt(Random *random, int minInclusive, int maxInclusive);
+ static double asbMax(double a, double b);
+ static int intFloorDiv(int a, int b);
+ static int nextInt(Random *random, int minInclusive, int maxInclusive);
+ static float nextFloat(Random *random, float min, float max);
+ static double nextDouble(Random *random, double min, double max);
static float wrapDegrees(float input);
static double wrapDegrees(double input);
+ static wstring createInsecureUUID(Random *random);
+ static int getInt(const wstring &input, int def);
+ static int getInt(const wstring &input, int def, int min);
+ static double getDouble(const wstring &input, double def);
+ static double getDouble(const wstring &input, double def, double min);
// 4J Added
static bool almostEquals( double double1, double double2, double precision);