mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 08:00:08 +01:00
util: add a clamp macro
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1280>
This commit is contained in:
parent
e8d24f818b
commit
74705ee94c
1 changed files with 1 additions and 0 deletions
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#define clamp(v, lo, hi) min((hi), max((lo), (v)))
|
||||
|
||||
#define ANSI_BOLD "\x1B[0;1m"
|
||||
#define ANSI_RED "\x1B[0;31m"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue