GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_common.h
1
//SPDX-License-Identifier: LGPL-2.0-or-later
2
3
/*
4
5
Copyright (c) 2014-2020 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
9
#ifndef GP_COMMON_H
10
#define GP_COMMON_H
11
12
#define GP_ODD_UP(x) ({ \
13
typeof(x) x__ = x; \
14
x__ + !(x__%2); \
15
})
16
17
#define GP_EVEN_UP(x) ({ \
18
typeof(x) x__ = x; \
19
x__ + (x__%2); \
20
})
21
22
#endif
/* GP_COMMON_H */
Generated by
1.9.8