2V2-e.5a: restore 40250 min-max helpers for camera update

This commit is contained in:
shenlei
2026-09-23 22:05:24 +09:00
parent cb43091f79
commit 702fef7b47
4 changed files with 141 additions and 18 deletions
+18 -18
View File
@@ -142,40 +142,40 @@ auto IsGlobalFileName(const char *) -> bool
return mt_platform_stub_return<bool>();
}
auto MIN(int, int) -> int
auto MIN(int a, int b) -> int
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<int>();
return a < b ? a : b;
}
auto MAX(int, int) -> int
auto MAX(int a, int b) -> int
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<int>();
return a > b ? a : b;
}
auto MINMAX(int, int, int) -> int
auto MINMAX(int min, int value, int max) -> int
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<int>();
if (max < min)
return MAX(min, value);
int tv;
tv = (min > value ? min : value);
return (max < tv) ? max : tv;
}
auto fMIN(float, float) -> float
auto fMIN(float a, float b) -> float
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<float>();
return a < b ? a : b;
}
auto fMAX(float, float) -> float
auto fMAX(float a, float b) -> float
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<float>();
return a > b ? a : b;
}
auto fMINMAX(float, float, float) -> float
auto fMINMAX(float min, float value, float max) -> float
{
MT_PLATFORM_STUB();
return mt_platform_stub_return<float>();
float tv;
tv = (min > value ? min : value);
return (max < tv) ? max : tv;
}
auto MyCreateDirectory(const char *) -> void