From f666d03b459874db763b3d868d2822089ee8149e Mon Sep 17 00:00:00 2001 From: SirSkeleto Date: Sun, 7 Apr 2019 13:24:38 -0400 Subject: [PATCH] clamp is now min(max()) (#22361) --- __DEFINES/_macros.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__DEFINES/_macros.dm b/__DEFINES/_macros.dm index 2e198017d9d..e20dceacb85 100644 --- a/__DEFINES/_macros.dm +++ b/__DEFINES/_macros.dm @@ -322,7 +322,7 @@ proc/get_space_area() return 0 //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 //y is the minimum //z is the maximum