Changeset 77 for mppenc/branches/r2d/common
- Timestamp:
- 10/17/06 16:55:28 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/branches/r2d/common/minimax.h
r65 r77 18 18 */ 19 19 20 #ifndef MPP_MINIMAX_H 21 #define MPP_MINIMAX_H 20 #pragma once 22 21 23 #if defined __GNUC__ && defined __cplusplus 22 # define clip(x,min,max) ( (x) < (min) ? (min) : (x) > (max) ? (max) : (x) ) 23 24 #ifdef __cplusplus 24 25 25 26 # define maxi(A,B) ( (A) >? (B) ) … … 30 31 # define minf(A,B) ( (A) <? (B) ) 31 32 32 # define absi(A) abs (A) 33 # define absf(A) fabsf (A) 34 # define absd(A) fabs (A) 35 36 #elif defined __GNUC__ 33 #else 37 34 38 35 # define maxi(A,B) ( (A) > (B) ? (A) : (B) ) … … 43 40 # define minf(A,B) ( (A) < (B) ? (A) : (B) ) 44 41 42 #endif 43 44 #ifdef __GNUC__ 45 45 46 # define absi(A) abs (A) 46 47 # define absf(A) fabsf (A) … … 49 50 #else 50 51 51 # define maxi(A,B) ( (A) > (B) ? (A) : (B) )52 # define mini(A,B) ( (A) < (B) ? (A) : (B) )53 # define maxd(A,B) ( (A) > (B) ? (A) : (B) )54 # define mind(A,B) ( (A) < (B) ? (A) : (B) )55 # define maxf(A,B) ( (A) > (B) ? (A) : (B) )56 # define minf(A,B) ( (A) < (B) ? (A) : (B) )57 58 52 # define absi(A) ( (A) >= 0 ? (A) : -(A) ) 59 53 # define absf(A) ( (A) >= 0.f ? (A) : -(A) ) 60 54 # define absd(A) ( (A) >= 0. ? (A) : -(A) ) 61 55 62 #endif /* GNUC && C++ */56 #endif 63 57 64 #endif /* MPP_MINIMAX_H */
Note: See TracChangeset
for help on using the changeset viewer.