From dbae987f1fb54da795185a03f4c00d56a639f8cd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 31 Dec 2025 15:13:32 -0500 Subject: Changed is_between() to be bidirectional --- src/stdlib/numX.c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/numX.c.h') diff --git a/src/stdlib/numX.c.h b/src/stdlib/numX.c.h index ed91fbf5..22db3ca3 100644 --- a/src/stdlib/numX.c.h +++ b/src/stdlib/numX.c.h @@ -155,7 +155,7 @@ CONSTFUNC NUM_T NAMESPACED(mix)(NUM_T amount, NUM_T x, NUM_T y) { public CONSTFUNC bool NAMESPACED(is_between)(const NUM_T x, const NUM_T low, const NUM_T high) { - return low <= x && x <= high; + return (low <= x && x <= high) || (high <= x && x <= low); } public CONSTFUNC NUM_T NAMESPACED(clamped)(NUM_T x, NUM_T low, NUM_T high) { -- cgit v1.2.3