ifw-odp 5.1.1
 
Loading...
Searching...
No Matches
clipm_priv_math.h
Go to the documentation of this file.
1
7
21
22#ifndef CLIPM_PRIV_MATH_H
23#define CLIPM_PRIV_MATH_H
24
25/*-----------------------------------------------------------------------------
26 Includes
27 -----------------------------------------------------------------------------*/
28
29/*-----------------------------------------------------------------------------
30 Function Macros
31 -----------------------------------------------------------------------------*/
32
33/*----------------------------------------------------------------------------*/
40
41/*----------------------------------------------------------------------------*/
42#define clipm_priv_math_max(a, b) \
43 ((a) > (b) ? (a) : (b))
44
45/*----------------------------------------------------------------------------*/
52/*----------------------------------------------------------------------------*/
53#define clipm_priv_math_min(a, b) \
54 ((a) < (b) ? (a) : (b))
55
56/*----------------------------------------------------------------------------*/
62/*----------------------------------------------------------------------------*/
63#define clipm_priv_math_sign(in) \
64 ((in) >= 0 ? 1 : -1)
65
66/*-----------------------------------------------------------------------------
67 Declaration Block
68 -----------------------------------------------------------------------------*/
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
74/*----------------------------------------------------------------------------*/
82/*----------------------------------------------------------------------------*/
83#define clipm_priv_math_round_d2i(in) \
84 ((in < 0) ? (int)(in - 0.5) : (int)(in + 0.5))
85
87/*----------------------------------------------------------------------------*/
88
89#ifdef __cplusplus
90} /* extern "C" */
91#endif
92
93#endif /* CLIPM_PRIV_MATH_H */