diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-05 12:27:20 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-10-05 12:47:56 +0200 |
commit | 49bb1b57f82a7ef2de5ed9a7d39caafb6c8328c9 (patch) | |
tree | 3b2e52068515f80bc7ac893c6e89a0686d13cd87 /Macros.h | |
parent | ff455b0004080a260a63f12ca8bf7c148eab6ee7 (diff) |
Assert that low value is lower than the high value in CLAMP
Diffstat (limited to 'Macros.h')
-rw-r--r-- | Macros.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -10,7 +10,7 @@ #endif #ifndef CLAMP -#define CLAMP(x, low, high) (((x) > (high)) ? (high) : MAXIMUM(x, low)) +#define CLAMP(x, low, high) (assert(low < high), ((x) > (high)) ? (high) : MAXIMUM(x, low)) #endif #ifndef ARRAYSIZE |