GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
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 WIDGETS_GP_COMMON_H
10#define WIDGETS_GP_COMMON_H
11
12#define GP_ODD_UP(x) ({ \
13 typeof(x) x_tmp = x; \
14 x_tmp + !(x_tmp%2); \
15})
16
17#define GP_EVEN_UP(x) ({ \
18 typeof(x) x_tmp = x; \
19 x_tmp + (x_tmp%2); \
20})
21
22#endif /* WIDGETS_GP_COMMON_H */