Go to the documentation of this file. 1#ifndef __XBOOT_STDDEF_H__
2#define __XBOOT_STDDEF_H__
11# define offsetof vsf_offset_of
14#define clamp(v, a, b) min(max(a, v), b)
16#define ifloor(x) ((x) > 0 ? (int)(x) : (int)((x) - 0.9999999999))
17#define iround(x) ((x) > 0 ? (int)((x) + 0.5) : (int)((x) - 0.5))
18#define iceil(x) ((x) > 0 ? (int)((x) + 0.9999999999) : (int)(x))
19#define idiv255(x) ((((int)(x) + 1) * 257) >> 16)