Browse Source

Add consts M_MIN_I64, M_MAX_I64, M_MIN_U64, M_MAX_U64

1vanK 3 năm trước cách đây
mục cha
commit
2ddc729989

+ 12 - 0
Source/Urho3D/AngelScript/Generated_GlobalVariables.cpp

@@ -340,18 +340,30 @@ void ASRegisterGeneratedGlobalVariables(asIScriptEngine* engine)
     // constexpr float M_MAX_FOV | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const float M_MAX_FOV", (void*)&M_MAX_FOV);
 
+    // constexpr i64 M_MAX_I64 | File: ../Math/MathDefs.h
+    engine->RegisterGlobalProperty("const int64 M_MAX_I64", (void*)&M_MAX_I64);
+
     // constexpr i32 M_MAX_INT | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const int M_MAX_INT", (void*)&M_MAX_INT);
 
+    // constexpr u64 M_MAX_U64 | File: ../Math/MathDefs.h
+    engine->RegisterGlobalProperty("const uint64 M_MAX_U64", (void*)&M_MAX_U64);
+
     // constexpr u32 M_MAX_UNSIGNED | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const uint M_MAX_UNSIGNED", (void*)&M_MAX_UNSIGNED);
 
+    // constexpr i64 M_MIN_I64 | File: ../Math/MathDefs.h
+    engine->RegisterGlobalProperty("const int64 M_MIN_I64", (void*)&M_MIN_I64);
+
     // constexpr i32 M_MIN_INT | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const int M_MIN_INT", (void*)&M_MIN_INT);
 
     // constexpr float M_MIN_NEARCLIP | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const float M_MIN_NEARCLIP", (void*)&M_MIN_NEARCLIP);
 
+    // constexpr u64 M_MIN_U64 | File: ../Math/MathDefs.h
+    engine->RegisterGlobalProperty("const uint64 M_MIN_U64", (void*)&M_MIN_U64);
+
     // constexpr u32 M_MIN_UNSIGNED | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const uint M_MIN_UNSIGNED", (void*)&M_MIN_UNSIGNED);
 

+ 6 - 2
Source/Urho3D/Math/MathDefs.h

@@ -25,9 +25,13 @@ namespace Urho3D
 inline constexpr float M_PI = 3.14159265358979323846264338327950288f;
 inline constexpr float M_HALF_PI = M_PI * 0.5f;
 inline constexpr i32 M_MIN_INT = 0x80000000;
-inline constexpr i32 M_MAX_INT = 0x7fffffff;
+inline constexpr i32 M_MAX_INT = 0x7FFFFFFF;
 inline constexpr u32 M_MIN_UNSIGNED = 0x00000000;
-inline constexpr u32 M_MAX_UNSIGNED = 0xffffffff;
+inline constexpr u32 M_MAX_UNSIGNED = 0xFFFFFFFF;
+inline constexpr i64 M_MIN_I64 = 0x8000000000000000;
+inline constexpr i64 M_MAX_I64 = 0x7FFFFFFFFFFFFFFF;
+inline constexpr u64 M_MIN_U64 = 0;
+inline constexpr u64 M_MAX_U64 = 0xFFFFFFFFFFFFFFFF;
 
 inline constexpr u16 M_U16_MASK_ALL_BITS = 0xFFFF;
 inline constexpr i16 M_I16_MASK_ALL_BITS = -1;