mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
clamp is now min(max()) (#22361)
This commit is contained in:
@@ -322,7 +322,7 @@ proc/get_space_area()
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
//1 line helper procs compressed into defines.
|
//1 line helper procs compressed into defines.
|
||||||
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
|
#define Clamp(x, y, z) min(max(x, y), z)
|
||||||
//x is the number you want to clamp
|
//x is the number you want to clamp
|
||||||
//y is the minimum
|
//y is the minimum
|
||||||
//z is the maximum
|
//z is the maximum
|
||||||
|
|||||||
Reference in New Issue
Block a user