VSF Documented
minmax.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_MINMAX_H__
2#define __VSF_LINUX_MINMAX_H__
3
4// for vsf_min/vsf_max
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define min(x, y) vsf_min(x, y)
12#define max(x, y) vsf_max(x, y)
13#define min_t(type, x, y) vsf_min((type)x, (type)y)
14#define max_t(type, x, y) vsf_max((type)x, (type)y)
15#define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
16
17#ifdef __cplusplus
18}
19#endif
20
21#endif