aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/intX.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/intX.c.h')
-rw-r--r--src/stdlib/intX.c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/intX.c.h b/src/stdlib/intX.c.h
index 3e6648f7..04c8ef3b 100644
--- a/src/stdlib/intX.c.h
+++ b/src/stdlib/intX.c.h
@@ -116,7 +116,7 @@ PUREFUNC bool NAMESPACED(equal)(const void *x, const void *y, const TypeInfo_t *
}
public
CONSTFUNC bool NAMESPACED(is_between)(const INT_T x, const INT_T low, const INT_T high) {
- return low <= x && x <= high;
+ return (low <= x && x <= high) || (high <= x && x <= low);
}
public
CONSTFUNC INT_T NAMESPACED(clamped)(INT_T x, INT_T min, INT_T max) {