mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-06 07:10:11 +01:00
util: add min/max macros
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b34139c9e7
commit
01ee0f7ef9
1 changed files with 3 additions and 0 deletions
|
|
@ -73,6 +73,9 @@ int list_empty(const struct list *list);
|
|||
#define ARRAY_FOR_EACH(_arr, _elem) \
|
||||
for (int i = 0; (_elem = &_arr[i]) && i < ARRAY_LENGTH(_arr); i++)
|
||||
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
/*
|
||||
* This fixed point implementation is a verbatim copy from wayland-util.h from
|
||||
* the Wayland project, with the wl_ prefix renamed li_.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue